We study optimal carbon capture and storage (CCS), taking into account damages incurred from the accumulation of carbon in the atmosphere and exhaustibility of fossil fuel reserves. High carbon concentrations call for full CCS. We identify conditions under which partial or no CCS is optimal. In the absence of CCS the CO2 stock might be inverted U-shaped. With CCS more complicated behavior may arise. It can be optimal to have full capture initially, yielding a decreasing stock, then partial capture while keeping the CO2 stock constant, and a final phase without capture but with an inverted U-shaped CO2 stock. We also introduce the option of adaptation and provide a unified theory regarding the optimal use of CCS and adaptation