This paper for the PF Thompson memorial lecture concerns CO2 corrosion of carbon steel and its inhibition during petroleum production. Important aspects of the mechanism of CO2 corrosion are covered together with significant advances in understanding corrosion inhibitor mechanism. Some gaps in the mechanism of corrosion inhibitors and areas considered worthy of future research are mentioned. Test methods to evaluate corrosion inhibitors are also covered. The contributions made in these areas of corrosion science by colleagues, former colleagues and PhD students are presented.