RPM performs three basic functions: It installs, upgrades, and removes packages. In addition to these functions, it can find out all sorts of information about installed and yet-to-be-installed packages. (All this, and it washes windows too.) Here’s a brief rundown of each function:
Installing packages: RPM installs software. Software systems, such as Mozilla, have files of all types that must be put into certain locations in order to work properly. For example, under Red Hat, some (but not all) of the Mozilla files need to go into the /usr/bin directory. RPM performs this organizational stuff automatically, without any fuss or muss.
Tip RPM not only installs files in their proper directories but also performs tasks such as creating the directories and running scripts to do the things that need to be done. (It’s such a tidy and organized little scamp.)
Upgrading packages: Gone are the days when updating a system was worse than going to the dentist. RPM acts like the personal Linux assistant you wish you had by updating existing software packages for you. RPM also keeps track of, in a database of its own, all the packages you have installed. When you upgrade a package, RPM does all the bookkeeping chores and replaces only the files that need to be replaced. It also saves the configuration files it replaces.
Removing packages: The package database the RPM keeps is also useful in removing packages. To put it simply, RPM takes out the trash. (House-keeping was never so easy.) RPM goes to each file and uninstalls it. Direc- tories belonging to the package are also removed when no files from other packages occupy them.
Querying packages and files: RPM can also give you a great deal of information about a package and its files. You can use the query function to find out the function of a package and which files belong to it. RPM can also work on the RPM packages themselves, regardless of whether they have been installed.
Verifying packages: RPM can validate an installed package against a checksum (a computer fingerprint) to see whether and how it has been changed. This feature is useful for security reasons. If you suspect that a file or system has been hacked, you can use RPM to find out how it has changed.
TipRPM packages often include configuration files as part of their installation. If you erase an RPM package, those configuration files are not deleted but instead are renamed by appending the suffix .rpmsave to the end of the original filename. For example, removing the Kerberos package, krbafs, saves the configuration file by renaming /etc/krb.conf to /etc/krb.conf.rpmsave.
TipWhen you remove a package, RPM removes the associated files and directories. RPM cleans up after itself — what Martha Stewart would definitely call “a good thing.”