[sf-lug] package change logging

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Aug 2 20:29:21 PDT 2017


> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [sf-lug] NEED INFO ABOUT BOOT SECTOR, SPACE LIMITS
> Date: Wed, 2 Aug 2017 14:20:37 -0700

> If it turns out that you shouldn't have, you can also reinstall them.
> Don't forget, package operations get neatly logged.  Look, for example
> (as the root user), at /var/log/apt/history.log and /var/log/apt/term.log.
> All that information you worried would be lost forever as it flew past
> while apt-get does its work is all there, for posterity.

Also not sure exactly when Debian added it, and may also vary
among other Debian-based distributions, but I noticed some while
back, Debian added default behavior where dpkg itself logs
its change actions.  So, regardless of what package tool (at least anything
reasonably standard on Debian), they all work through dpkg at the lower
level, ... thus dpkg ends up logging all those package change actions.

$ (cd /var/log && ls -ltr dpkg* | sed -ne '1p;$p')
-rw-r--r-- 1 root root  38376 Nov 29  2013 dpkg.log.12
-rw-r--r-- 1 root root      0 Aug  1 00:35 dpkg.log
$
Hmmm, okay don't actually have all the detailed log stuff going
back *quite* that far.  Looks like compression got added to the
log rotation scheme more recently, so ... as for contiguous logging
coverage, we actually have:
$ (cd /var/log && ls -ltr dpkg*) | sed -ne '/\.gz$/{p;:l;n;${p;q};bl}'
-rw-r--r-- 1 root root  11437 Aug 19  2016 dpkg.log.12.gz
-rw-r--r-- 1 root root      0 Aug  1 00:35 dpkg.log
$




More information about the sf-lug mailing list