We derive the evolution of the energy deposition in the intergalactic medium (IGM) by dark matter (DM) decays/annihilations for both sterile neutrinos and light dark matter (LDM) particles. At z > 200 sterile neutrinos transfer a fraction f(abs) similar to 0.5 of their rest mass energy into the IGM; at lower redshifts this fraction becomes less than or similar to 0.3 depending on the particle mass. The LDM particles can decay or annihilate. In both the cases f(abs) similar to 0.4-0.9 at high (> 300) redshift, dropping to approximate to 0.1 below z = 100. These results indicate that the impact of DM decays/annihilations on the IGM thermal and ionization history is less important than previously thought. We find that sterile neutrinos (...