The electrical and optoelectronic properties of materials are determined by the chemical potentials of their constituents. The relative density of point defects is thus controlled, allowing to craft microstructure, trap densities and doping levels. Here, we show that the chemical potentials of chalcogenide materials near the edge of their existence region are not only determined during growth but also at room temperature by post-processing. In particular, we study the generation of anion vacancies, which are critical defects in chalcogenide semiconductors and topological insulators. The example of CuInSe2 photovoltaic semiconductor reveals that single phase material crosses the phase boundary and forms surface secondary phases upon oxidation, thereby creating anion vacancies. The arising metastable point defect population explains a common root cause of performance losses. This study shows how selective defect annihilation is attained with tailored chemical treatments that mitigate anion vacancy formation and improve the performance of CuInSe2 solar cells.