I'm seeing some errors in my apache logs and they may (or may not) be related to some packages that I recently installed/removed using Yum.
Is there a way to view the history of Yum packages that have been updated/installed/removed ?
I could use the "history" command from unix, but some installations may have been done with different accounts. I've tried searching the web and reading the man page too but haven't found anything.
5 Answers
Well,
yum history does the job as well.
3I believe you can find what you are looking for in the yum log files which are located in /var/log/yum.log
For example:
yum history list
[root ~]> yum history list Loaded plugins: dellsysidplugin2, fastestmirror, refresh-packagekit ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 2 | User <username> | 2010-01-19 15:10 | Erase | 1 1 | User <username> | 2010-01-19 14:55 | Update | 3 history list Show history info for ID 2
[root ~]> yum history info 2 Loaded plugins: dellsysidplugin2, fastestmirror, refresh-packagekit Transaction ID : 2 Begin time : Tue Jan 19 15:10:13 2010 Begin rpmdb : 2431:fe4c2c846fd45c9125fb8ab27542a27b22e0d3df End time : 15:10:27 2010 (14 seconds) End rpmdb : 2430:2eeb12b0b0f2ef3fcb31b4447b439e76e92e3866 User : User <username> Return-Code : Success Transaction performed with: Installed rpm-4.7.2-1.fc12.i686 Installed yum-3.2.25-1.fc12.noarch Installed yum-plugin-fastestmirror-1.1.24-2.fc12.noarch Packages Altered: Erase arora-0.10.2-2.fc12.i686 history info To list packages you have installed, try this:
alias yum-userinstall="yumdb search command_line install* | grep command_line\ = | sort | uniq | sed -r -e 's/command_line = (.*)/yum \1/g'" Result:
# yum-userinstall yum install bind-utils yum install yum install yum install lsof yum install nano yum install nfs-utils libnfsidmap yum install nmap-ncat yum install openscap-scanner yum install open-vm-tools PS1: it doesn't show dependencies
PS2: it is sorted alphabetically
PS3: it doesn't show if you have removed the package later
also try
grep yum < ~/.bash_history