RPM: Difference between revisions
From Leo's Notes
This page was last edited on 21 April 2013, at 23:57.
No edit summary |
No edit summary |
||
| Line 11: | Line 11: | ||
# rpm -qf /etc/hosts | # rpm -qf /etc/hosts | ||
setup-2.8.14-10.el6.noarch | setup-2.8.14-10.el6.noarch | ||
== Warning: RPMDB altered outside of yum. == | |||
If you ever get the error: | |||
Warning: RPMDB altered outside of yum. | |||
... it probably means that you ran <code>rpm</code>. To fix this warning, clear <code>yum</code>'s cache and force a rebuild by running: | |||
yum clean all | |||
yum makecache | |||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:TipsnTricks]] | [[Category:TipsnTricks]] | ||
Revision as of 23:57, 21 April 2013
To list installed packages:
rpm -qa
To look for a specific package by name:
rpm -qi <package name>
To determine the origin of a file:
rpm -qf <path to file>
eg:
# rpm -qf /etc/hosts setup-2.8.14-10.el6.noarch
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