Transmission electron microscopy (TEM) is carried out in vacuum to minimize the interaction of the imaging electrons with gas molecules while passing through the microscope column. Nevertheless, in typical devices, the pressure remains at 10 −7 mbar or above, providing a large number of gas molecules for the electron beam to crack, which can lead to structural changes in the sample. Here, we describe experiments carried out in a modified scanning TEM (STEM) instrument, based on the Nion UltraSTEM 100. In this instrument, the base pressure at the sample is around 2 × 10 −10 mbar, and can be varied up to 10 −6 mbar through introduction of gases directly into the objective area while maintaining atomic resolution imaging conditions. We show that air leaked into the microscope column during the experiment is efficient in cleaning graphene samples from contamination, but ineffective in damaging the pristine lattice. Our experiments also show that exposure to O 2 and H 2 O lead to a similar result, oxygen providing an etching effect nearly twice as efficient as water, presumably due to the two O atoms per molecule. H 2 and N 2 environments have no influence on etching. These results show that the residual gas environment in typical TEM instruments can have a large influence on the observations, and show that chemical etching of carbon-based structures can be effectively carried out with oxygen. arXiv:1811.04266v3 [cond-mat.mes-hall]