Installation guide
220 Chapter 25. Package Management with RPM
failed dependencies:
bar is needed by foo-1.0-1
#
To handle this error you should install the requested packages. If you want to force the
installation anyway (a bad idea since the package probably will not run correctly), use the
--nodeps option.
25.2.3. Uninstalling
Uninstalling a package is just as simple as installing one. Type the following command at a
shell prompt:
# rpm -e foo
#
Note
Notice that we used the package name foo, not the name of the original package file foo-1.0-
1.i386.rpm. To uninstall a package, you will need to replace foo with the actual package name of
the original package.
You can encounter a dependency error when uninstalling a package if another installed
package depends on the one you are trying to remove. For example:
# rpm -e foo
removing these packages would break dependencies:
foo is needed by bar-1.0-1
#
To cause RPM to ignore this error and uninstall the package anyway (which is also a bad idea
since the package that depends on it will probably fail to work properly), use the --nodeps
option.
25.2.4. Upgrading
Upgrading a package is similar to installing one. Type the following command at a shell
prompt:
# rpm -Uvh foo-2.0-1.i386.rpm
foo ####################################
#
What you do not see above is that RPM automatically uninstalled any old versions of the
foo package. In fact, you may want to always use -U to install packages, since it will work
even when there are no previous versions of the package installed.
Since RPM performs intelligent upgrading of packages with configuration files, you may
see a message like the following:
saving /etc/foo.conf as /etc/foo.conf.rpmsave