To see exactly the same information as displayed by apt-listchanges
, you’d have to look through the apt
history in /var/log/apt/history.log
to list the packages that were upgraded, then look for corresponding NEWS.Debian.gz
and changelog.Debian.gz
entries. Since you’re interested in the last upgrade performed through apt
, look for the most recent “Upgrade:” line in history.log
(the one closest to the top). This will list packages and the versions upgraded from and to; you can then look for corresponding entries in the changelogs. For example,
$ grep -m 1 '^Upgrade:' /var/log/apt/history.log
Upgrade: tzdata:amd64 (2024b-0+deb12u1, 2025b-0+deb12u1), libsystemd0:amd64 (252.33-1~deb12u1, 252.36-1~deb12u1), libudev1:amd64 (252.33-1~deb12u1, 252.36-1~deb12u1), libc6:amd64 (2.36-9+deb12u9, 2.36-9+deb12u10), base-files:amd64 (12.4+deb12u9, 12.4+deb12u10), libc-bin:amd64 (2.36-9+deb12u9, 2.36-9+deb12u10)
$ zcat /usr/share/doc/tzdata/changelog.Debian.gz | awk '/2025b-0\+deb12u1/,/2024b-0\+deb12u1/' | head -n -1
There are a few subtleties here. You need to trim the architecture from each package name; ideally you’d also want to deduplicate binary packages based on source packages (above, libc6
and libc-bin
share the same changelog). The from and to versions need to be inverted, and any characters with special meaning in regular expressions need to be escaped. This approach doesn’t necessarily work with NEWS.Debian.gz
either: those files don’t have entries for every single version, so you need to match the versions with entries against the version range by doing an explicit version comparison.
Without going into that amount of detail, if you know approximately when you upgraded, you can find the corresponding files by date and look at the recent entries there (at the top of each file). For example, to see notices upgraded in the last two days:
find /usr/share/doc -name NEWS.Debian.gz -ctime -3 -exec less {} +
The equivalent command for changelogs is
find /usr/share/doc -name changelog.Debian.gz -ctime -3 -exec less {} +
Both commands run less
on a number of files; to view each file you need to move to the next one with :n
instead of quitting less
.
(Note that -mtime
isn’t useful here because the last modification time is set to match the timestamp stored in the package, so it will always be older than the date and time at which the system was upgraded.)
If your system is capable of sending email directly, you can configure apt-listchanges
to send its output by email as well as displaying it on-screen during the upgrade; this would avoid such problems in the future.
less /var/log/apt/history.log
andless /var/log/apt/term.log
right? What is your distro?