Debian: How do I check the last time package upgrades/updates were run?

Solution 1:

The file /var/log/apt/history.log gives you information on when APT was run and what was done.

tail -3 /var/log/apt/history.log

will give you this information for the last run of APT (not necessarily the last run of upgrage, though).

To find out when was the last time you've run an upgrade, you want to look for a line starting with Upgrade: and then lookup up the timestamp in the following line of the file (which starts with End-Date:). The last such match is the last time you've run an upgrade.

Solution 2:

Outside of lucking out on log files located in /var/log/apt - e.g.: /var/log/apt/var/log/history.log or /var/log/term.log

The closest thing I can think about is to examine dpkg:

ls -alt /var/lib/dpkg/info | head -n 10

The dates on the top should approximate the last time apt handled those packages.

Solution 3:

There are some other comments that are not bad, but what you are really looking for is /var/log/dpkg.log.

dpkg is a low level tool for manipulating packages thus every package modification will be logged there.