This paper reviews confinement-driven phase transitions in superconductors and Bardeen-Cooper-Schrieffer superfluids, and the appearance in thin films of new phases that break the time-reversal or translational symmetry. The origins of the new phases are closely tied to the Andreev scattering processes involving particle-hole conversions that create surface quasiparticle states with energies inside the superconducting gap. Restructuring of the low-energy spectrum in the surface region of several coherence lengths results in large spatial variations of the superconducting order parameter. In confined geometry, such as slabs, films, pores or nano-dots, with one or more physical dimensions∼10, the Andreev bound states can dominate properties of a superconductor, leading to modified experimental signatures. They can significantly change the energy landscape, and drive transitions into new superconducting phases. The new phases are expected in a variety of materials, from singlet -wave superconductors to multi-component triplet superfluidHe, but properties of the new phases will depend on the symmetry of the parent state. I will highlight the connection between the Andreev surface states and confinement-stabilized phases with additional broken symmetries, describe recent progress and open questions in the theoretical and experimental investigation of superfluids in confined geometry.This article is part of the theme issue 'Andreev bound states'.