RPM
From Leo's Notes
This page was last edited on 29 April 2013, at 15:58.
Common RPM Tasks
Below are the common tasks I do with RPM.
List installed packages
rpm -qa
Look for a specific package by name
rpm -qi <package name>
Determine the origin of a file
rpm -qf <path to file>
eg:
# rpm -qf /etc/hosts
setup-2.8.14-10.el6.noarch
Remove a package with a broken uninstall script
rpm -e --noscripts <package>
Troubleshooting
Warning: RPMDB altered outside of yum.
If you ever get the error:
Warning: RPMDB altered outside of yum.
... it probably means that you ran rpm. To fix this warning, clear yum's cache and force a rebuild by running:
yum clean all
yum makecache