How can I tell what rpms are managed outside of yum? [closed]

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.


Solution 1:

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.

Solution 2:

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.