To remove a package, issue the following
command:
rpm -e
<packagename>
Notice that this time, only <packagename> is used, not the full name of the file used to
install the software. When this command is issued, the RPM database is searched
for the files associated with this package, and they are removed.
If multiple versions of a package are
installed, such as the kernel, the package version can also be specified to
make sure the correct version is removed:
rpm -e
<packagename>-<version>-<release>
As previously discussed, sometimes packages
must have additional packages installed for them to function properly. If you
try to remove a package that is needed by a package installed, a message
similar to the following is shown:
error: Failed
dependencies:
example-filters
is needed by example-core = 1:2.0.0-3.2.1
If the package that depends on the package you
are trying to remove is still needed on the system, you should not try to
remove the package. If the package that depends on the package you are trying
to remove is also not needed, both must be removed at the same time to resolve
the dependency:
rpm -e
<packagename1> <packagename1>
Even if the packages are not dependent on each
other, multiple packages can be removed at the same time by specifying them in
the same command separated by a space. If a configuration file is part of the
package being removed but it has been modified, the file will be renamed
instead of removed with the .rpmsave extension, and a message similar to the
following is displayed:
warning:
/etc/sysconfig/samba saved as /etc/sysconfig/samba.rpmsave
0 comments:
Post a Comment