|
Learning Red Hat Linux Authors: McCarty B. Published year: 2003 Pages: 47-50/118 |
8.6 Uninstalling a PackageTo uninstall a package, type: rpm -e package In this command, package is the name of the package, not the name of the package file. The name should omit the architecture; it can also omit the package version or package version and release number. For example, you can erase the pine package by issuing either of the following commands: rpm -e pine-4.44-13 rpm -e pine If you attempt to uninstall a package on which another package depends, RPM will report a dependency error and terminate without uninstalling the package. You can force RPM to uninstall the package by using the -- nodeps option: rpm -e --nodeps package However, doing so will probably cause the dependent package to cease working properly. Therefore, you shouldn't use the -- nodeps option very often. |
8.7 Updating a PackageWhen you update (upgrade) a package, RPM installs the new version of the software but attempts to leave your existing configuration files intact. You can update a package by using the -U option of the rpm command: rpm -Uvh package When you update a package, RPM automatically uninstalls the old version of the package before installing the new one.
If RPM determines that your existing configuration files may be incompatible with those of the new version of the package, RPM will save a copy of the existing files. In that case, you need to examine the old and new files and determine what the proper configuration should be. The documentation that accompanies the package should assist you in this process. If you attempt to update an existing package using an older version of the package, RPM will report an error and terminate without performing the update. To force RPM to perform the update, use the -- oldpackage option: rpm -Uvh --oldpackage package |
8.8 Freshening a PackageFrom time to time, Red Hat issues updated packages that correct functional or security- related problems with released packages. You can use Red Hat Network, described later in this chapter in Section 8.10, to obtain and install updated packages. However, if you prefer, you can download updated packages via FTP and install them using the rpm command. Red Hat makes updated packages available on the public FTP servers ftp.redhat.com and updates.redhat.com . To install an updated package, use the -F flag, which stands for freshen . For instance, to install a updated version of the gv package, issue the command: rpm -Fvh gv-3.5.8-19.i386.rpm By specifying -F rather than -U , you instruct RPM to install the updated package only if an earlier version of the package is already present. This lets you use wildcards to specify entire sets of updated packages: rpm -Fvh *.rpm This command will not install packages that aren't already installed. But, it will install updated versions of any existing packages. |
8.9 Advanced RPM TechniquesBecause you invoke the rpm command by using the shell, just as you do any other program, you can combine options and arguments to perform a variety of useful tasks . Consider the following examples:
|
|
Learning Red Hat Linux Authors: McCarty B. Published year: 2003 Pages: 47-50/118 |