Nanostructuring experiments were performed on a YBa2Cu3O7 thin film surface with an atomic force microscope (AFM) with a conductive tip. Measurements of the local conductivity with the AFM tip show that corrosion towards a nonconducting surface occurs on a timescale of hours under ambient conditions. The corroded surface can easily be abraded, whereas the clean YBa2Cu3O7 surface is comparably resistive against mechanical forces. The corrosion is promoted by an electric current at positive sample bias. Thus it can be concluded that the nanostructuring process performed in former experiments with the scanning tunneling microscope consists of two steps: corrosion and succeeding abrasion. © 1997 American Institute of Physics.