dpkg tools date stamp

Asked by svkatielee on 2014-11-25

Is there any way to find the date/time stamp for package management actions
such as
first install date
last update date
last execution of trigger scripts

There are many times I would like to find the list of packages installed since first install
or list all packages that have been updated
or list all packages installed in the past 2 weeks or today ...

Thanks
Larry

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu dpkg Edit question
Assignee:
No assignee Edit question
Solved by:
svkatielee
Solved:
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

There are log files from dpkg in the directory /var/log/

grep 'install ' /var/log/dpkg.log
zgrep 'install ' /var/log/dpkg.log.*.gz

should show all recent package installations

You can also pipe the output of Manfred's commands to another grep to find certain package names.

Eg:

grep 'install ' /var/log/dpkg.log | grep libreoffice

Etc. You get the idea

svkatielee (svkatielee) said : #3

so if the log files are gone, there is no way.
OK, Thanks for the answers.
-Larry