Pollution is an inevitable by-product of production and is only gradually dissolved by the environment. It can be reduced by producing less and by cleaning up the environment, but neither occur when they are left to the market. Cleaning activities and the optimal emission charges increase with the stock of pollutants. When one allows for pollution of the environment in the classical Ramsey problem, the capital stock is less than in the market outcome and a fortiori less than under the golden rule. The analysis distinguishes between stock and flow externalities arising from pollution. An increase in impatience can lead to more capital accumulation, even though this leaves less room for current consumption.