Telling what RPM's are intsalled
Ed Wilts
ewilts at ewilts.org
Thu Mar 11 12:47:01 UTC 2004
On Thu, Mar 11, 2004 at 08:52:14AM -0800, jg wrote:
> I did a man & some searching & didn't find a straight
> answer... Sorry if this is lame but...
>
> Is there a shell commmand or rpm argument that will
> give you a list of every rpm installed on your system?
Current versions actually generate a text file of all the installed
packages.
[ewilts at p6000 ewilts]$ cat /etc/cron.daily/rpm
#!/bin/sh
rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \
| sort > /var/log/rpmpkgs
[ewilts at p6000 ewilts]$ rpm -qf /etc/cron.daily/rpm
rpm-4.2.1-4.4
The log file, /var/log/rpmpkgs, is generated daily and then logrotate
rotates this file on a weekly basis so you've got the last 4 weeks or so
online to see what changes might have been made to your system.
rpm is your friend for all rpm-based distributions. It's extremely
powerful, not only in simply identifying which packages are instaled,
but also for things like telling you which package owns a specific file
(see my example above).
--
Ed Wilts, Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program
More information about the redhat-list
mailing list