1

I am inheriting a Centos 5 box and I'd like to get an idea of what rpms have been installed outside of yum.

Bonus: How can I audit that RPMs installed with yum to make sure that they are not corrupt.

1
  • does diffing rpm -qa against /var/log/yum.log work ? - that's just a guess.
    – Sirex
    Feb 2, 2012 at 9:31

2 Answers 2

2

If a package was installed without yum, yum info lacks From repo field.

Here's a package installed from repositories:

Installed Packages
Name        : java-1.6.0-openjdk
Arch        : x86_64
Epoch       : 1
Version     : 1.6.0.0
Release     : 61.1.10.4.fc16
Size        : 81 M
Repo        : installed
From repo   : updates
Summary     : OpenJDK Runtime Environment
---8<---snip---8<---

Here's a package installed with rpm command:

Installed Packages
Name        : jre
Arch        : x86_64
Version     : 1.7.0
Release     : fcs
Size        : 46 M
Repo        : installed
Summary     : Java(TM) Platform Standard Edition Runtime Environment
---8<---snip---8<---

Try

for each in `rpm -qa`; do yum info $each | egrep "^(Name|Repo|From repo)"; echo; done >/tmp/packages.txt

And then see from /tmp/packages.txt which packages lack From repo line.

1

rpms installed / updated by yum are logged in /var/log/yum.log. All other have been either installed during the centos install process or with the rpm command.

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