Dpkg log
All deb package operations must go through deb system. So no matter you use apt-get install or deb -I, it will be logged in /var/log/dpkg.log.
lesspipe can show content of .gz files directly. But it cannot show normal text file .
Show install and upgrade history for dkg.log.#.gz files:
ls /var/log/dpkg.log*|sort -r|xargs -I{} lesspipe {}|egrep "^[0-9\-]+[[:space:]][0-9:]+[[:space:]](install|upgrade)[[:space:]]"
Show install and upgrade history for dkg.log and dpkg.log.# files:
ls /var/log/dpkg.log*|sort -r|grep -v ".gz"|xargs -I{} cat {}|egrep "^[0-9\-]+[[:space:]][0-9:]+[[:space:]](install|upgrade)[[:space:]]"
apt-get log
apt-get logges to /var/log/apt/term.log
aptitude
/var/log/aptitude
Resources
http://superuser.com/questions/6338/how-do-you-track-which-packages-were-installed-on-ubuntu-linux
As far as logs,
apt-get
notoriously doesn't have one;dpkg
does (at /var/log/dpkg.log) but it's famously hard to parse and can only be read with root privileges;aptitude
has one at /var/log/aptitude and you can page through it with regular user privileges.
No comments:
Post a Comment