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.



yum history

does the job as well.

| improve this answer | |
  • Doesn't seem to work on CentOS (at least, no my installation). – Daren Chandisingh Nov 21 '11 at 16:57
  • Ah, ok. Fedora only. – lzap Nov 21 '11 at 23:02
  • 3
    It's there now as of CentOS 6.2 ("yum help history"). "All good things come to those who wait...", the "those" being downstream users, the "good things" being stable software. Personally, I'm frequently too impatient to wait.... – michael Feb 19 '12 at 10:07

I believe you can find what you are looking for in the yum log files which are located in /var/log/yum.log

| improve this answer | |
  • 2
    If you want a clean list of installed packages, regardless of when or what happened (update/install), do this: cat /var/log/yum.log | sed "s#.\+: \?\(.\+\)#\1#" | sort | tee /tmp/yum.install.list.txt – nickboldt Sep 12 '16 at 13:33

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
| improve this answer | |

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'"


# yum-userinstall
     yum install bind-utils
     yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
     yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
     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

| improve this answer | |

also try

grep yum < ~/.bash_history
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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