Heating YBa2Cu3O7–x to temperatures of up to 925 K causes evolution of H2O, CO, and CO2 as the major volatile impurities contained in this material, which are observed here mass spectrometrically by using temperature-programmed desorption. The level of these impurities can be reduced significantly by annealing of the samples in oxygen (100 Torr, 673 K), cooling to 400 K at a rate of 5 K/min, heating to 925 K in vacuum, and repeating the oxygen anneal. In situ resistivity measurements show that the superconducting transition sharpens as the impurity levels are decreased; however, no change in Tc is observed. The out-diffusion of O2 was also followed by TPD, and these results agree well with previous studies. Both oxidized (YBa2Cu3O6.9) and reduced (YBa2Cu3O6.5) forms of the material were exposed to CO2 at mild temperatures (325–635 K). Reduced samples were found to adsorb significantly more CO2 than the oxidized material. The presence of adsorbed CO2 significantly inhibits reoxidation of the reduced YBa2Cu3O6.5 to YBa2Cu3O6.9. Indirect evidence by TPD suggests that CO2 may insert into oxygen vacancies in the partially reduced material. © 1990, American Chemical Society. All rights reserved.