  Stars in globular clusters (GCs) lose a non negligible amount of mass during
their post-main sequence evolution. This material is then expected to build up
a substantial intra-cluster medium (ICM) within the GC. However, the observed
gas content in GCs is a couple of orders of magnitude below these expectations.
Here we follow the evolution of this stellar wind material through
hydrodynamical simulations to attempt to reconcile theoretical predictions with
observations. We test different mechanisms proposed in the literature to clear
out the gas such as ram-pressure stripping by the motion of the GC in the
Galactic halo medium and ionisation by UV sources. We use the code ramses to
run 3D hydrodynamical simulations to study for the first time the ICM evolution
within discretised multi-mass GC models including stellar winds and full
radiative transfer. We find that the inclusion of both ram-pressure and
ionisation is mandatory to explain why only a very low amount of ionised gas is
observed in the core of GCs. The same mechanisms operating in ancient GCs that
clear the gas could also be efficient at younger ages, meaning that young GCs
would not be able to retain gas and form multiple generations of stars as
assumed in many models to explain "multiple populations". However, this rapid
clearing of gas is consistent with observations of young massive clusters.
