Installation guide

Chapter 25. Package Management with RPM 221
This message means that your changes to the configuration file may not be "forward com-
patible" with the new configuration file in the package, so RPM saved your original file, and
installed a new one. You should investigate the differences between the two configuration
files and resolve them as soon as possible, to ensure that your system continues to function
properly.
Upgrading is really a combination of uninstalling and installing, so during an RPM upgrade
you can encounter uninstalling and installing errors, plus one more. If RPM thinks you are
trying to upgrade to a package with an older version number, you will see:
# rpm -Uvh foo-1.0-1.i386.rpm
foo package foo-2.0-1 (which is newer) is already installed
#
To cause RPM to "upgrade" anyway, use the --oldpackage option:
# rpm -Uvh --oldpackage foo-1.0-1.i386.rpm
foo ####################################
#
25.2.5. Freshening
Freshening a package is similar to upgrading one. Type the following command at a shell
prompt:
# rpm -Fvh foo-1.2-1.i386.rpm
foo ####################################
#
RPM’s freshen option checks the versions of the packages specified on the command line
against the versions of packages that have already been installed on your system. When a
newer version of an already-installed package is processed by RPM’s freshen option, it will
be upgraded to the newer version. However, RPM’s freshen option will not install a package
if no previously-installed package of the same name exists. This differs from RPM’s upgrade
option, as an upgrade will install packages, whether or not an older version of the package
was already installed.
RPM’s freshen option works for single packages or a group of packages. If you have just
downloaded a large number of different packages, and you only want to upgrade those
packages that are already installed on your system, freshening will do the job. If you use
freshening, you will not have to deleting any unwanted packages from the group that you
downloaded before using RPM.
In this case, you can simply issue the following command:
# rpm -Fvh *.rpm
RPM will automatically upgrade only those packages that are already installed.
25.2.6. Querying
Use the rpm -q command to query the database of installed packages. The rpm -q foo com-
mand will print the package name, version, and release number of the installed package foo:
# rpm -q foo
foo-2.0-1