Control over the localised conductance recently observed at ferroelectric domain walls is key for their integration into potential nanoelectronics devices. Using a combination of piezoresponse force microscopy and local conductance mapping, we demonstrate switching between conducting and insulating behavior at 180° domain walls in epitaxial Pb(Zr0.2Ti0.8)O3 thin films subjected to ultrahigh vacuum thermal annealing or exposed to ambient conditions, respectively. The reversibility of this behavior is demonstrated in repeated annealing-exposure cycles. To explain these observations, we propose a mechanism based on changes in electrostatic and chemical boundary conditions through oxygen vacancy redistribution and the removal of surface adsorbates.