How to list recent yum updates
Solution 1:
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.
Solution 2:
Just this should show you plenty (show last 30):
rpm -qa --last | head -30