Last night I have updated one of my RedHat systems from 6.1 to 6.2. There were a few hundred updates.

How can I list the recent updates that was applied to my system? I have tried yum list recent but that only shows

Loaded plugins: product-id, rhnplugin, subscription-manager
Updating certificate-based repositories.
Recently Added Packages
Red_Hat_Enterprise_Linux-Release_Notes-6-as-IN.noarch                 2-5.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-bn-IN.noarch                 2-5.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-de-DE.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-en-US.noarch                 2-22.el6_2                 rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-es-ES.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-fr-FR.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-gu-IN.noarch                 2-5.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-hi-IN.noarch                 2-7.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-it-IT.noarch                 2-7.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-ja-JP.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-kn-IN.noarch                 2-8.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-ko-KR.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-ml-IN.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-mr-IN.noarch                 2-10.el6_2                 rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-or-IN.noarch                 2-5.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-pa-IN.noarch                 2-7.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-pt-BR.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-ru-RU.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-te-IN.noarch                 2-7.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-zh-CN.noarch                 2-6.el6_2                  rhel-x86_64-server-6
Red_Hat_Enterprise_Linux-Release_Notes-6-zh-TW.noarch                 2-4.el6_2                  rhel-x86_64-server-6
rng-tools.x86_64                                                      2-13.el6_2                 rhel-x86_64-server-6

This should do it.

rpm -qa --qf '%{INSTALLTIME} %-40{NAME} %{INSTALLTIME:date}\n' | sort -n | cut -d' ' -f2-

That queries all your installed RPM packages (rpm -qa) and prints them using a format (--qf) with the time of installation first in seconds since the epoch(%{INSTALLTIME}), then the name of the package in a 40 character field, left justified (%-40{NAME}), then the installation time as a date and time (%{INSTALLTIME:date}). The result is sorted by the first time field, then that time field is removed.

  • 10
    It appears that this causes the same output rpm -qa --last – Dejan Dec 9 '11 at 18:53

Just this should show you plenty (show last 30):

rpm -qa --last | head -30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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