Massive haloes of hot plasma exist around some, but not all elliptical galaxies. There is evidence that this is related to the age of the galaxy. In this paper, new X-ray observations are presented for three early-type galaxies that show evidence of youth, in order to investigate their X-ray components and properties. NGC 5363 and NGC 2865 were found to have X-ray emission dominated by purely discrete stellar sources. Limits are set on the mass distribution in one of the galaxies observed with XMM-Newton, NGC 4382, which contains significant hot gas. We detect the X-ray emission in NGC 4382 out to 4re. The mass-to-light ratio is consistent with a stellar origin in the inner regions but rises steadily to values indicative of some dark matter by 4re. These results are set in context with other data drawn from the literature, for galaxies with ages estimated from dynamical or spectroscopic indicators. Ages obtained from optical spectroscopy represent central luminosity-weighted stellar ages. We examine the X-ray evolution with age, normalized by B- and K-band luminosities. Low values of Log(Lx/LB) and Log(L X/LK) are found for all galaxies with ages between 1 and 4 Gyr. Luminous X-ray emission only appears in older galaxies. This suggests that the interstellar medium is removed and then it takes several gigayears for hot gas haloes to build up, following a merger. A possible mechanism for gas expulsion might be associated with feedback from an active nucleus triggered during a merger.