The shape evolution of epitaxially grown InAs/GaAs(001) quantum dots after the controlled removal of material by an in situ etching gas is investigated by atomic force and scanning tunneling microscopy. The presence of {137} facets on the surface of partially etched quantum dots and the appearance of small two-dimensional islands for long etching times indicate the reversal of the shape transition that occurs during growth. This reversibility impressively confirms that both the growth process and the etching process are dominated by thermodynamic factors. We find that the evolution of the quantum dots is not determined by direct etching but is mainly caused by the etching of the wetting layer and the subsequent diffusion of In atoms from the quantum dots onto the bare GaAs, thus rewetting the substrate.