rpm quick reference - useful stuff

Useful rpm commands
rpm -qa | grep [string]

Will show if the RPM you specify (in the string) is installed

rpm -qf [/path/somefile]

will show which package provides the specified file

rpm -ql [packagename]

will show all files contained in the installed package specified

rpm -qlp [package.rpm]

will list the files contained in the specified rpm file (showing their full path names)

rpm -i --root [directory] [file.rpm]

Will perform a chrooted rpm install into the specified directory. Useful if building initramfs images, modifying LiveOS images etc. It will also update the RPM database inside the chrooted environment.

rpm -e [package]

uninstall a package

rpm -i --nodeps [package] 

Install the package regardless of dependencies. Again useful for chrooted installs where the contents of the package exist but aren't recorded in the RPM database (or the RPM database isn't readable etc).