We investigate the environmental dependence of the stellar populations of galaxies in SDSS DR7. Echoing earlier works, we find that satellites are both more metal-rich (<0.1 dex) and older (<2 Gyr) than centrals of the same stellar mass. However, after separating star-forming, green valley and passive galaxies, we find that the true environmental dependence of both stellar metallicity (<0.03 dex) and age (<0.5 Gyr) is in fact much weaker. We show that the strong environmental effects found when galaxies are not differentiated result from a combination of selection effects brought about by the environmental dependence of the quenched fraction of galaxies, and thus we strongly advocate for the separation of star-forming, green valley and passive galaxies when the environmental dependence of galaxy properties are investigated. We also study further environmental trends separately for both central and satellite galaxies. We find that star-forming galaxies show no environmental effects, neither for centrals nor for satellites. In contrast, the stellar metallicities of passive and green valley satellites increase weakly (< 0.05 dex and < 0.08 dex, respectively) with increasing halo mass, increasing local overdensity and decreasing projected distance from their central; this effect is interpreted in terms of moderate environmental starvation (`strangulation) contributing to the quenching of satellite galaxies. Finally, we find a unique feature in the stellar mass--stellar metallicity relation for passive centrals, where galaxies in more massive haloes have larger stellar mass (~0.1 dex) at constant stellar metallicity; this effect is interpreted in terms of dry merging of passive central galaxies and/or progenitor bias.