Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 31 down vote accepted

To list all packages, sorted by install date, latest first:

    rpm -qa --last
share|improve this answer

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.)

share|improve this answer
    
Super helpful snippet, thanks! – Peter Hanley Apr 25 '14 at 14:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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