The aggregate capital stock in a nation can be overaccumulated for many different reasons. This paper studies which policy or policy mix is more effective in achieving the socially optimal (golden rule) level of aggregate capital stock in an infinite-horizon heterogeneous-agents incomplete-markets economy where capital is over-accumulated for two distinct reasons: (i) precautionary savings and (ii) production externalities. By solving the Ramsey problem analytically along the entire transitional path, we show that public debt and capital taxation play very distinct roles in dealing with the overaccumulation problem. The Ramsey planner opts neither to use a capital tax to correct the overaccumulation problem if it is caused solely by precautionary saving---regardless of the feasibility of public debt---nor use debt (financed by consumption tax) to correct the overaccumulation problem if it is caused solely by pollution---regardless of the feasibility of a capital tax. The key is that the modified golden rule has two margins: an intratemporal margin pertaining to the marginal product of capital (MPK) and an intertemporal margin pertaining to the time discount rate. To achieve the MGR, the Ramsey planner needs to equate not only the private MPK with the social MPK but also the interest rate with the time discount rate---neither of which is equalized in a competitive equilibrium. Yet public debt and a capital tax are each effective only in calibrating one of the two margins, respectively, but not both.