March 3, 2014

Dpkg.log : List Of Package Management Events



There is a single log file that records all the apt activities, such as installs or upgrades, for the various package managers (dpkg, apt-get, synaptic, aptitude). It can be found here : /var/log/dpkg.log.

There are more dpkg.log* files :

cd /var/log
ls | grep dpkg
dpkg.log
dpkg.log.1
dpkg.log.2.gz
dpkg.log.3.gz

Log files are rotated. That is, they have automatically been renamed after a predefined time-frame, and a new original log started. After even more time the log files are compressed with the gzip utility.

To get a chronological list of all package management events ( install, remove, purge and upgrade ) :
zcat -f /var/log/dpkg.log* | grep "\ install\ " | sort>installed-packages

Replace install and installed-packages with remove/removed-packages...etc.

About zcat : open terminal and type :
man zcat

No comments:

Post a Comment