zypper equivalent of “rug history” command


By: smflood

April 11, 2013 10:21 am





Do you remember the “rug history” command that you could use to list (and search through) previously installed packages?

With rug you could use the “rug history” command to list previously installed packages but strangely this command is missing from zypper.

The good news is that whilst there is no ‘zypper history’ command, any packages installed or updated through zypper are logged in /var/log/zypp/history. The bad news is that the file also logs some other output so you can’t just ‘cat /var/log/zypp/history’ to get the equivalent output to ‘rug history’.

What you can do however is process /var/log/zypp/history to produce a similar output by using the ‘cut’ command:

cut -d "|" -f 1-4 -s --output-delimiter " | " /var/log/zypp/history | grep -v " radd "

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5)
You need to be a registered member to rate this post.

Categories: Open Enterprise Server on SLES, openSUSE, SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else in the SUSE Blog, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.