We have analyzed the galaxy number density and luminosity density profiles of rich clusters of galaxies from redshifts z \sim 0 to z \sim 0.5 . We show that the luminosity profile computed with bright galaxies ( M _ { R } < -21 ) is significantly cusped in the center of the clusters , whatever the redshift . This is in agreement with the dark matter profiles predicted by numerical simulations . The galaxy number density profile for the bright galaxies is fitted equally well with a core model or a cusped model . In contrast , the luminosity and the galaxy number density profiles of the fainter galaxies are significantly better fitted by a core rather than a cusp model . We did not detect any statistically significant different fits when applied to data in range from z \sim 0 to z \sim 0.5 . The difference in profile between faint and bright galaxies may be due to the rapid ( relative to the age of the universe at z=0 versus z=0.5 ) destruction of the faint galaxies by tidal forces and merging events in the denser central regions of the clusters . This process could erase the cusp by turning faint galaxies into diffuse light . In this case , the galaxies ( with a cusp visible in the bright galaxy number density and mainly in luminosity profiles ) would trace the total mass distribution .