give another example command for obsolete package authored by anarcat's avatar anarcat
......@@ -190,15 +190,23 @@ If you want to know which packages are marked as obsolete, you can use the
following two commands:
apt list "?obsolete"
# The following will mainly print the same list as above, but there might be
# some more in its list.
apt list "?narrow(?installed, ?not(?codename($(lsb_release -c -s | tail -1))))"
The authoritative source for the alert, however, is the `apt_info`
collector, which might differ from the above:
DEBUG=1 /usr/share/prometheus-node-exporter-collectors/apt_info.py >/dev/null
Check the state of each package with `apt policy $package` to determine what
needs to be done with it. If most cases, the packages can just be purged, but
maybe not if they are obsolete because an apt source was lost. In that latter
case, you may want to check out why the source was removed and make sure to
bring it back.
maybe not if they are obsolete because an apt source was lost.
In that latter case, you may want to check out why the source was
removed and make sure to bring it back. Sometimes it means downgrading
the package to an earlier version, in case we used an incorrect
backport (`apt.postgresql.org` packages, suffixed with `pgdg` are in
that situation, as their version is higher than `debian.org`
packages).
## Out of date package lists
......
......