  In linearized gravity with distributed matter, the background metric has no
generic symmetries, and decomposition of the metric perturbation into global
normal modes is generally impractical. This complicates the identification of
the gauge-invariant part of the perturbation, which is a concern, for example,
in the theory of dispersive gravitational waves whose energy--momentum must be
gauge-invariant. Here, we propose how to identify the gauge-invariant part of
the metric perturbation and the six independent gauge invariants
\textit{per~se} for an arbitrary background metric. For the Minkowski
background, the operator that projects the metric perturbation on the invariant
subspace is proportional to the well-known dispersion operator of linear
gravitational waves in~vacuum. For a general background, this operator is
expressed in terms of the Green's operator of the vacuum wave equation. If the
background is smooth, it can be found asymptotically using the inverse scale of
the background metric as a small parameter.
