/var/log/dpkg.log
deve conter as informações desejadas:
De man dpkg
:
--log=filename
Log status change updates and actions to filename, instead of the default /var/log/dpkg.log.
If this option is given multiple times, the last filename is used.
Log messages are of the form:
YYYY-MM-DD HH:MM:SS startup type command
for each dpkg invocation where type is archives (with a command of unpack or install) or packages (with a command of configure, triggers-only, remove or purge);
YYYY-MM-DD HH:MM:SS status state pkg installed-version
for status change updates;
YYYY-MM-DD HH:MM:SS action pkg installed-version available-version
for actions where action is one of install, upgrade, configure, trigproc, disappear, remove or purge;and
YYYY-MM-DD HH:MM:SS conffile filename decision
for conffile changes where decision is either install or keep.
por exemplo. Eu instalei ksh
esta manhã para investigar a diferença entre mksh
e ksh93
.
# grep ksh /var/log/dpkg.log
2015-11-18 09:39:52 install ksh:amd64 <none> 93u+20120801-2
2015-11-18 09:39:52 status half-installed ksh:amd64 93u+20120801-2
2015-11-18 09:39:52 status half-installed ksh:amd64 93u+20120801-2
2015-11-18 09:39:52 status unpacked ksh:amd64 93u+20120801-2
2015-11-18 09:39:52 status unpacked ksh:amd64 93u+20120801-2
2015-11-18 09:39:57 configure ksh:amd64 93u+20120801-2 <none>
2015-11-18 09:39:57 status unpacked ksh:amd64 93u+20120801-2
2015-11-18 09:39:57 status unpacked ksh:amd64 93u+20120801-2
2015-11-18 09:39:57 status half-configured ksh:amd64 93u+20120801-2
2015-11-18 09:39:57 status installed ksh:amd64 93u+20120801-2
Se você quiser apenas saber quando os pacotes foram instalados ou atualizados, tente algo assim:
# zgrep -E '(install|upgrade) bash[: ]' /var/log/dpkg.log*
/var/log/dpkg.log.12.gz:2014-11-25 12:19:59 upgrade bash:amd64 4.3-11 4.3-11+b1
/var/log/dpkg.log.2.gz:2015-09-12 18:52:44 upgrade bash:amd64 4.3-13 4.3-14
/var/log/dpkg.log.4.gz:2015-07-29 10:27:33 upgrade bash:amd64 4.3-12 4.3-13
/var/log/dpkg.log.9.gz:2015-02-09 11:54:56 upgrade bash:amd64 4.3-11+b1 4.3-12
O [: ]
à direita na regex é para excluir outros pacotes, como bash-builtins
, bash-completion
, bash-doc
etc da listagem.