50

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. – Trevor Boyd Smith Jan 21 '19 at 14:07
71

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

rpm -qa --last
25

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

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.