The Red Hat Package Manager (RPM) is an open packaging system, which runs on Red Hat Enterprise Linux as well as other Linux and UNIX systems like SuSE, Mandriva, Fedora and CentOS.
RPM is used to:
- Install new packages
- Uninstall existing packages
- Upgrade existing packages to the latest version
- Verify the integrity of existing packages
RPM also has powerful querying facilities. Those can be used, for example, for listing all installed packages, getting information on an installed package, identifying from which package a specific file is from, etc.
As RPM installs files obtained from the Internet, it also supports the use of cryptographic keys to authenticate packages.
Package Management Tool
RPM is a command line program and can be somewhat complex to use. For those who prefer graphical applications, there exists the a graphical package management tool.
YUM (Yellowdog Updater Modified)
YUM is now the standard tool for package management in Red Hat Enterprise Linux and derivatives. For most usual tasks, YUM should be used in preference to RPM as it supports new features that are now considered to be essential by most system administrators.
For example, YUM can install packages from various sources, called repositories. Those repositories can be on the Internet (e.g. an official Red Hat repository), on a LAN as well as local. Creating a local repository is a relatively straightforward task. This opens a lot of possibilities like downloading packages from a mirror, creating a repository of them on the LAN and configuring all computers in an organisation to use that rapidly-accessible repository.
Furthermore, YUM is better than RPM as it tracks (and resolves) dependencies among packages automatically. This makes installing complex packages trivial.
Package Management with APT
The Advanced Packaging Tool (APT) as used in Debian, Ubuntu and Linux Mint is the equivalent of RPM/YUM.
In general, system administrators prefer using the aptitude tool instead of the apt-get and apt-cache commands which are lower level tools with fewer capabilities.
aptitude can either be used as a command line tool or as a text application (see picture above). In both cases, aptitude can then:
- install a package with its dependencies
- remove a package while leaving its configuration files
- purge a package with its configuration files
- remove auto-installed packages which are no longer required
- display detailed information about packages
- search for packages which match a regular expression
aptitude is more advanced than YUM as it knows how to track dependencies both on installation and removals. YUM only resolves dependencies when installing packages.