55

I'm on a CentOS machine. I updated and installed some packages a few weeks back, but I don't remember the name of every package or the names of every dependency. I used yum.

Can I list the packages on my system by the date they were last installed or updated?

1
  • This question (and the solutions) is probably generic to all RPM based Linux distros like Fedora, RHEL, CENTOS, and so on. I say probably just to be on the safe side. Jan 21, 2019 at 14:07

3 Answers 3

75

To list all packages and their install dates, latest first:

rpm -qa --last
1
  • or the most recent 20 items which also show which sub version of RHEL (eg., 8.7.3): rpm -qa --last | grep -E el8_[[:digit:]].[[:digit:]] | head -20
    – nickboldt
    Apr 19, 2023 at 19:01
26

This should work on any RPM based machine:

rpm -qa --qf '%{INSTALLTIME} (%{INSTALLTIME:date}): %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -n

(To get a list of all possible tags, use rpm --querytags.)

0
0

You might like the latest last:

rpm -qa --last | tac

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .