Product SiteDocumentation Site

A.2.2. Uninstalling Packages

Uninstalling a package is just as simple as installing one. Type the following command at a shell prompt as root:
rpm -e package

rpm -e and package name errors

Note that the command expects only the package name, not the name of the original package file. If you attempt to uninstall a package using the rpm -e command and provide the original full file name, you receive a package-name error.
You can encounter dependency errors when uninstalling a package if another installed package depends on the one you are trying to remove. For example:
~]# rpm -e ghostscript
error: Failed dependencies:
        ghostscript is needed by (installed) ghostscript-cups-9.07-16.fc25.x86_64
        ghostscript is needed by (installed) foomatic-4.0.9-6.fc25.x86_64 is needed by (installed) libspectre-0.2.7-4.fc25.x86_64 is needed by (installed) gutenprint-5.2.9-15.fc25.x86_64 is needed by (installed) cups-filters-1.0.35-15.fc25.x86_64

Warning: Forcing Package Installation

Although you can force rpm to uninstall a package that has unresolved dependencies (using the --nodeps option), this is not recommended. Removing packages with --nodeps can cause applications from the packages whose dependencies are removed to misbehave or terminate unexpectedly. It can also cause serious package-management problems or system failure. For these reasons, heed the warnings about failed dependencies.