Tips & Tricks
Featured Article: The RPM Package Manager [RPM]


June 2003

What is RPM? And how can it be used? RPM can be used to install, uninstall, query and maintain the packages on your system. There are a few basic commands everyone should know.

For example, to install:

[root@localhost root]# rpm -ivh package-name

The 'i' says install, the 'v' is verbose output, and the 'h' will string '#######' to indicate progess. If you are upgrading a package use:

[root@localhost root]# rpm -Uvh package-name

This will upgrade the package or install it if it's not installed. Using -F instead of -U will make it upgrade only installed packages.

To find out if a package is installed, or which version is installed, typing

[root@localhost root]# rpm -q package-name

will tell you. Another thing you can do with a query is create a listing what files a pacakge installed:

[root@localhost root]# rpm -ql package-name

and:

[root@localhost root]# rpm -qi package-name

will output the header info.

Sometimes you will want to uninstall a package, which you can do with:

[root@localhost root]# rpm -e package-name

All of that's great, right? But how do you build source RPMs? How do you build binaries from source? How do you do anything and everything RPM can do for you? Then have we got the book for you: Red Hat RPM Guide, from Red Hat Press