Star formation in half of massive galaxies was quenched by the time the Universe was 3 billion years old1. Very low amounts of molecular gas seem to be responsible for this, at least in some cases2–7, although morphological gas stabilization, shock heating or activity associated with accretion onto a central supermassive black hole are invoked in other cases8–11. Recent studies of quenching by gas depletion have been based on upper limits that are insufficiently sensitive to determine this robustly2–7, or stacked emission with its problems of averaging8,9. Here we report 1.3 mm observations of dust emission from 6 strongly lensed galaxies where star formation has been quenched, with magnifications of up to a factor of 30. Four of the six galaxies are undetected in dust emission, with an estimated upper limit on the dust mass of 0.0001 times the stellar mass, and by proxy (assuming a Milky Way molecular gas-to-dust ratio) 0.01 times the stellar mass in molecular gas. This is two orders of magnitude less molecular gas per unit stellar mass than seen in star forming galaxies at similar redshifts12–14. It remains difficult to extrapolate from these small samples, but these observations establish that gas depletion is responsible for a cessation of star formation in some fraction of high-redshift galaxies.