RPM cheat sheet

Posted on the November 6th, 2009 under Cheat Sheets, Server Admin Tips by Stephen

RPM is the package manager for the following Linux Operating Systems: RedHat, CentOS, Fedora and SUSE. Here, I noted down some useful commands to manage RPM packages. Please share if you know other useful RPM commands.

 

 
Install a package:

rpm -ivh package_name

 
Upgrade a package:

rpm -Uvh package_name

 
Uninstall a package:

rpm -ev package_name

 
Uninstall a package without checking for its dependencies:

rpm -ev --nodeps package_name

 
Display the version of the installed package:

rpm -q package_name

 
Display the name and version of all packages installed in the server:

rpm -qa

 
Display the packages got installed recently:

rpm -qa --last

 
To rebuild a corrupted RMP database:

rpm --rebuilddb

 


Share this page:
  • Facebook
  • Twitter
  • StumbleUpon
  • Slashdot
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Live
  • MySpace
  • Technorati
  • LinkedIn
  • Reddit
Related Posts:
  1. Useful Yum Commands
  2. Screen cheat sheet
  3. Ubuntu LAMP cheat sheet
  4. Unix FIND command cheat sheet
  5. Iptables cheat sheet

Leave a Comment