For a given invariant set of a dynamical system, it is known that the existence of a Lyapunov-type density function, called Lyapunov density or Rantzer's density function, may imply the convergence of almost all solutions to the invariant set, in other words, the almost global stability (also called almost everywhere stability) of the invariant set. For discrete-time systems, related results in literature assume that the state space is compact and the invariant set has a local basin of attraction. We show that these assumptions are redundant. Using the duality between Frobenius-Perron and Koopman operators, we provide a Lyapunov density theorem for discrete-time systems without assuming the compactness of the state space or any local attraction property of the invariant set. As a corollary to this new discrete-time Lyapunov density theorem, we provide a continuous-time Lyapunov density theorem which can be used as an alternative to Rantzer's original theorem, especially where the solutions are known to exist globally.