The Herschel Reference Survey is a complete volume-limited, K-band-selected sample of nearby objects including Virgo cluster and isolated objects. Using a recent compilation of Hi and CO data for this sample we study the effects of the cluster environment on the molecular gas content of spiral galaxies. With the subsample of unperturbed field galaxies, we first identify the stellar mass as the scaling variable that traces the total molecular gas mass of galaxies better. We show that, on average, Hi-deficient galaxies are significantly offset (4σ) from the M(H2) vs. Mstar relation for Hi-normal galaxies. We use the M(H2) vs. Mstar scaling relation to define the H2-deficiency parameter as the difference, on logarithmic scale, between the expected and observed molecular gas mass for a galaxy of given stellar mass. The H2-deficiency parameter shows a weak and scattered relation with the Hi-deficiency parameter, here taken as a proxy for galaxy interactions with the surrounding cluster environment. We also show that, as for the atomic gas, the extent of the molecular disc decreases with increasing Hi-deficiency. All together, these results show that cluster galaxies have, on average, a lower molecular gas content than similar objects in the field. Our analysis indicates that ram pressure stripping is the physical process responsible for this molecular gas deficiency. The slope of the H 2-def vs. Hi-def relation is less than unity, while the D(Hi)/D(i) vs. Hi-def relation is steeper than the D(CO)/D(i) vs. Hi-def relation, thereby indicating that the molecular gas is removed less efficiently than the atomic gas. This result can be understood if the atomic gas is distributed on a relatively flat disc that is more extended than the stellar disc. It is thus less anchored to the gravitational potential well of the galaxy than the molecular gas phase, which is distributed on an exponential disc with a scalelength rCO ≃ 0.2r24.5(g). There is a clear trend between the NUV-i colour index, which is a proxy for the specific star formation activity, and the H2-deficiency parameter, which suggests that molecular gas removal quenches the activity of star formation. This causes galaxies migrate from the blue cloud to the green valley and, eventually, to the red sequence. The total gas-consumption timescale of gas deficient cluster galaxies is comparable to that of isolated, unperturbed systems. The total gas depletion timescale determined by considering the recycled fraction is τgas,R ≃ 3.0-3.3 Gyr, which is significantly larger than the typical timescale for total gas removal in a ram pressure stripping process, indicated by recent hydrodynamical simulations to be τRP≃ 1.5 Gyr. The comparison of these timescales suggests that ram pressure, rather than a simple stop of the infall of pristine gas from the halo, will be the dominant process driving the future evolution of these cluster galaxies. © 2014 ESO.