An obstacle for the transformation to a low-carbon economy is the carbon lock-in: fossil fuel-based ("dirty") technologies dominate the market although their carbon-free ("clean") alternatives are dynamically more efficient. We study the interaction of learning-by-doing spillovers with the substitution elasticity between a clean and a dirty sector to evaluate the robustness of policies averting the carbon lock-in. We find that the substitution possibilities between the two sectors have an ambivalent effect: although a high substitution elasticity requires less aggressive mitigation policies than a low one, it creates a greater welfare loss through the lock-in in the absence of regulation. The socially optimal policy response consists of a permanent carbon tax as well as a learning subsidy for clean technologies. We thus indicate that the policy implications of (Acemoglu, D., Aghion, P., Bursztyn, L., Hemous, D., 2012. The Environment and Directed Technical Change. American Economic Review 120 (1): 131-166), calling for merely temporary interventions based on the mechanism of directed technical change in the same setting, are limited in scope. Our results also highlight that infrastructure provision is crucial to facilitate the low-carbon transformation.