We use the secondary infall model described in Del Popolo ( 2009 ) , which takes into account the effect of dynamical friction , ordered and random angular momentum , baryons adiabatic contraction and dark matter baryons interplay , to study how inner slopes of relaxed \Lambda CDM dark matter ( DM ) halos with and without baryons ( baryons+DM , and pure DM ) depend on redshift and on halo mass . We apply the quoted method to structures on galactic scales and clusters of galaxies scales . We find that the inner logarithmic density slope , \alpha \equiv d \log \rho / d \log r , of dark matter halos with baryons has a significant dependence on halo mass and redshift with slopes ranging from \alpha \simeq 0 for dwarf galaxies to \alpha \simeq 0.4 for objects of M \simeq 10 ^ { 13 } M _ { \odot } and \alpha \simeq 0.94 for M \simeq 10 ^ { 15 } M _ { \odot } clusters of galaxies . Structures slopes increase with increasing redshift and this trend reduces going from galaxies to clusters . In the case of density profiles constituted just of dark matter the mass and redshift dependence of slope is very slight . In this last case , we used the Merrit et al . ( 2006 ) analysis who compared N -body density profiles with various parametric models finding systematic variation in profile shape with halo mass . This last analysis suggests that the galaxy-sized halos obtained with our model have a different shape parameter , i.e . a different mass distribution , than the cluster-sized halos , obtained with the same model . The results of the present paper argue against universality of density profiles constituted by dark matter and baryons and confirm claims of a systematic variation in profile shape with halo mass , for dark matter halos .