Nanoscale control of the metal-insulator transition in LaAlO3/ SrTiO3 heterostructures can be achieved using local voltages applied by a conductive atomic-force microscope probe. One proposed mechanism for the writing and erasing process involves an adsorbed H2O layer at the top LaAlO3 surface. In this picture, water molecules dissociates into OH- and H+ which are then selectively removed by a biased AFM probe. To test this mechanism, writing and erasing experiments are performed in a vacuum AFM using various gas mixtures. Writing ability is suppressed in those environments where H2O is not present. The stability of written nanostructures is found to be strongly associated with the ambient environment. The self-erasure process in air can be strongly suppressed by creating a modest vacuum or replacing the humid air with dry inert gas. These experiments provide strong constraints for theories of both the writing process as well as the origin of interfacial conductance.