12

After upgrading packages my system is not booting anymore. How can I list last updated packages from terminal in order to revert the changes? Or is there a simpler way to take back latest upgrade?

2
  • From LiveCD/USB look in /var/log/apt/history.log where what is installed is shown date-wise. Whether knowing that will help you, I don't know.
    – DK Bose
    Mar 15, 2014 at 9:27
  • you mean update, right? which command you executed? apt-get update,apt-get upgrade or apt-get update && apt-get upgrade? Mar 15, 2014 at 9:28

1 Answer 1

17

Command to list recently installed packages that were installed via any method (apt-get, Software Center...):

cat /var/log/dpkg.log | grep "\ install\ "

Example output:

2010-12-08 15:48:14 install python-testtools <none> 0.9.2-1
2010-12-08 15:48:16 install quickly-widgets <none> 10.09
2010-12-08 22:21:31 install libobasis3.3-sdk <none> 3.3.0-17
2010-12-09 12:00:24 install mc <none> 3:4.7.0.6-1
2010-12-09 23:32:06 install oggconvert <none> 0.3.3-1ubuntu1
2010-12-09 23:34:50 install mpg123 <none> 1.12.1-3ubuntu1
2010-12-09 23:34:52 install dir2ogg <none> 0.11.8-1
2010-12-09 23:34:53 install faad <none> 2.7-4
2010-12-09 23:34:54 install wavpack <none> 4.60.1-1
2010-12-10 11:53:00 install playonlinux <none> 3.8.6


Command to list history of apt-get (NOTE: this doesn't list dependencies installed, it simply lists previous apt-get commands that were run):

cat /var/log/apt/history.log | grep "\ install\ "

Example output:

Commandline: apt-get install libindicate-doc
Commandline: apt-get install googlecl
Commandline: apt-get --reinstall install ttf-mscorefonts-installer
Commandline: apt-get install valac libvala-0.10-dev
Commandline: apt-get install libgtksourceview-dev
Commandline: apt-get install python-sphinx
Commandline: apt-get install python-epydoc
Commandline: apt-get install quickly-widgets
Commandline: apt-get install libreoffice3* libobasis3.3*
Commandline: apt-get install mc
4
  • 1
    Does this also list upgraded packages?
    – kenn
    Mar 15, 2014 at 9:38
  • 3
    yes of course because in the upgrade process the upgraded packages will be installed. You can also change the command like this to check for more info : grep "\ upgrade\ " Mar 15, 2014 at 9:43
  • 2
    As of 16.04, it is "\ installed\ " not "\ install\ ".
    – jazzwhiz
    Sep 3, 2018 at 9:35
  • Nowadays the correct commnad should be: cat /var/log/dpkg.log | grep "\ upgrade\ "
    – dharman
    Jul 11, 2023 at 14:15

Not the answer you're looking for? Browse other questions tagged .