There is a large consensus among international institutions and national governments to favor urban-containment policies –the compact city– as a way to improve the ecological performance of the urban system. This approach overlooks a fundamental fact: what matters for the ecological outcome of cities is the mix between the level of population density and the global pattern of activities. As expected, when both the intercity and intra-urban distributions of activities are given, a higher population density makes cities more environmentally friendly. However, once we account for the fact that cities may be either monocentric or polycentric as well as for the possible relocation of activities between cities, the relationship between population density and the ecological performance of cities appears to be much more involved. Indeed, because changes in population density affect land rents and wages, firms and workers are incited to relocate, thus leading to new commuting and shipping patterns. We show that policies favoring the decentralization of jobs in big cities may be more desirable because they both reduce pollution and improve welfare.