Early-type galaxies are considered to be the endproducts of massive galaxy formation 1 . Optical spectroscopic studies reveal that massive early-type galaxies formed the bulk of their stars over short timescales (≤1 Gyr) and at high redshift (z≤2), followed by passive evolution to the present 2 . However, their optical spectra are insensitive to constrain small episodes of recent star formation, since they are dominated by old stars. Fortunately, this problem can be tackled in the ultraviolet range. While recent studies that make use of ultraviolet absorption lines have suggested the presence of young stars in a few early-type galaxies 3 , the age and mass fractions of young stars and their dependence on galaxy mass, is unknown. Here we report a detailed study of these young stellar populations, from high-quality stacked spectra of 28,663 galaxies from the BOSS survey 4 , analysing optical and ultraviolet absorption lines simultaneously. We find that residual star formation is ubiquitous in massive early-type galaxies, measuring average mass fractions of ~0.5% in young stars in the last 2 Gyr of their evolution. This fraction shows a decreasing trend with galaxy stellar mass, consistent with a down-sizing scenario 5 . We also find that synthetic galaxies from stateof-the-art cosmological numerical simulations 6 significantly overproduce both intermediate and young stellar populations. Therefore, our results pose stringent constraints on numerical simulations of galaxy formation 6,7 . Stephano Charlot for kindly providing us their new version of stellar population models extended to the UV spectral range in order to test how results change when using other SSP models.