Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to show the history of installed packages that were installed by apt-get via commandline?

share|improve this question

1 Answer

up vote 7 down vote accepted

All actions with apt (apt-get) are logged. These files are available in /var/log/apt/. To view the most recent history log, execute:

less /var/log/apt/history.log

These logs gets rotated (every month I guess), old files will be suffixed with a number and compressed. So to view the next history log, use:

zless /var/log/apt/history.log.1.gz

To view the logs available:

ls -la /var/log/apt/
share|improve this answer
This is excellent. The only thing missing is who ran the commands. – Limited Atonement Apr 3 '12 at 17:33
1  
@LimitedAtonement Have a look at /var/log/auth.log, it may contain the user running the installation. (this won't help if the installation was invoked through a shell/program running as root) – Lekensteyn Apr 3 '12 at 17:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.