  We derive new constraints on models of decaying and annihilating dark matter
(DM) by requiring that the energy injected into the intergalactic medium (IGM)
not overheat it at late times, when measurements of the Lyman-$\alpha$ forest
constrain the IGM temperature. We improve upon previous analyses by using the
recently developed $\texttt{DarkHistory}$ code package, which self-consistently
takes into account additional photoionization and photoheating processes due to
reionization and DM sources. Our constraints are robust to the uncertainties of
reionization and competitive with leading limits on sub-GeV DM that decays
preferentially to electrons.
