Uninstalling a Package

To uninstall a package, type a command like this one:

            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.33-8
            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.

Get Learning Red Hat Linux, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.