Cartoon Edmund

Home

Calendar

Contact

Knight Vision

Sitemap



Edmund J. Sutcliffe
Thoughtful Solutions, Creatively Implemented and Communicated

Commonly-used RPM "Basic Modes"

  • -b = Build New Package
  • -q = Query information from installed or uninstalled packages
  • -U = Install/upgrade packages to the system
  • -F = Freshen packages existing on the system
  • -e = Uninstall packages from the system
  • -V = Verify the validity of packages on the system, or an uninstalled package
Now let's look at ways to invoke these modes in really cool ways!


Installing and Uninstalling Packages

Question RPM Command
How do I install a new package, or upgrade it if it already exists? rpm -Uvh package.rpm
If I have a directory containing updated packages, how do I upgrade only the ones currently on my system? rpm -Fvh *.rpm
How do I delete an installed package from my computer? rpm -e package


Querying Info from Packages

Question RPM Command
How do I see a list of all installed packages on my computer? rpm -qa | less
I don't know what a certain installed package does. How can I get it to tell me about itself? rpm -qi package
How do I ask what files were installed by a certain installed package? rpm -ql package
How do I get a-yet-uninstalled package to give me information about itself and the files it would install on my computer? rpm -qilp package.rpm
There's a file on my computer called /usr/bin/weirdo. How can I find out which installed package it belongs to? rpm -qf /usr/bin/weirdo
How do I find out which package installed /usr/bin/weirdo, AND how do I get information on that package and see all the other files it installed? rpm -qilf /usr/bin/weirdo


Verifying Packages

Question RPM Command
I deleted a few files by accident, but I don't know what they are. Can rpm show me which files in its database are now missing? rpm -Va
I think I've been hacked! How do I check for files that have been modified or removed in any way? rpm -Va
'rpm -Va' takes a long time. How do I just verify that a certain package is OK? rpm -Vv package
How do I test the integrity of a yet-uninstalled package file? rpm -K --nopgp package.rpm


Building Source Packages

Making your own RPM's is beyond the scope of this quick reference (see the Maximum RPM book for that), but it's not unusual to want to build from RPM's that only contain source code, not binaries. This is especially relevant for non-Intel architectures like PowerPC, Alpha, and Sparc which may not have platform-specific RPM's available, only the source code RPM's.

Question RPM Command
I've downloaded an RPM package containing source code. How do I make a binary RPM out of it, and then install it? rpm --rebuild package.src.rpm,
then rpm -Uvh package.rpm


Miscellaneous

Question RPM Command
How do I compress and rebuild my computer's RPM database? rpm --rebuilddb



Cartoon Edmund

Quick Ref

Tech Tips

Travel Tips

Tech News

Images