We study the atomic (HI) and molecular hydrogen (H2) contents of early-type galaxies (ETGs) and their gas sources using the GALFORM model of galaxy formation. This model uses a selfconsistent calculation of the star formation rate, which depends on the H2 content of galaxies. We first present a new analysis of HI Parkes All-Sky Survey and ATLAS3D surveys, with special emphasis on ETGs. The model predicts HI and H2 contents of ETGs in agreement with the observations from these surveys only if partial ram pressure stripping of the hot gas is included, showing that observations of neutral gas in 'quenched' galaxies place stringent constraints on the treatment of the hot gas in satellites. We find that ≈90 per cent of ETGs at z = 0 have neutral gas contents supplied by radiative cooling from their hot haloes, 8 per cent were supplied by gas accretion from minor mergers that took place in the last 1 Gyr, while 2 per cent were supplied by mass-loss from old stars. The model predicts neutral gas fractions strongly decreasing with increasing bulge fraction. This is due to the impeded disc regeneration in ETGs, resulting from both active galactic nuclei feedback and environmental quenching by partial ram pressure stripping of the hot gas. © 2014 The Authors. Published by Oxford University Press on behalf of the Royal Astronomical Society.