Whenever you apply an install/update/remove any package or packages Ubuntu log the changes happened to packages in its default file /var/log/dpkg.log. If you do listing to /var/log/ path (below is the command) you may find numbers of uncompressed and compressed dpkg.log files it depends on what type of log rotate policy is configure in file /etc/logrotate.conf
To list out numbers of available dpkg.log files below is the command:
ls -ltrh /var/log/dpkg.log*
Below is the sample output of available dpkg.log files in my Ubuntu 16.04 Linux machine.
You can use below commands for checking the installed, remove and applied updates to packages in your Ubuntu machines:
tail -f /var/log/dpkg.log
If you want to only filter out what packages are updated in your Ubuntu machine, below is the command:
grep upgrade /var/log/dpkg.log
Below is the sample output of /var/log/dpkg.log file of my Ubuntu Linux machine:
You have notice in above sample output file all logs are logged with date and time when updates were applied even apart from updates you can get the information regarding installed, removed of packages on that perticular date and time (Date and time format: YYYY:MM:DD HH:MM:SS).
Introducing another log file /var/log/apt/history.log it contains clear crystal output of installed, remove and applied updates of packages with details. Example for getting exact applied updated packages detail with particular date use below command:
grep -A4 'YYYY:MM:DD' /var/log/apt/history.log
Below is the sample of my Ubuntu machine /var/log/apt/history.log log as you can see I have applied packages update recently on 30th Sep 2018. You can see in below screenshot apart from date, which command was used for applying update and which user had requested or executed that command. Which is helpful in auditing the machine.
81 total views, 2 views today
- How to manage the Apache logs with the help of Linux logrotation utility - September 18, 2022
- SAPCONF5: Upgrading managing and addressing high swapping issue in SAP HANA server - August 15, 2022
- RHEL 7 / CentOS 7 boot problem after P2V by using VMware converter - August 14, 2022
2 thoughts on “I have applied updates in my Ubuntu Linux machine how do I check what updates are applied?”
Very informative content, i was looking for that only.
Thanks Naren for your valuable comment. Happy to see you like this tutorial.