Take the 2-minute tour ×
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.

I'm on a CentOS 4 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
add comment

2 Answers

up vote 11 down vote accepted

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

    rpm -qa --last
share|improve this answer
add comment

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 at 14:24
add comment

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.