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.

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 switch:

rpm -e --nodeps package

However, doing so will probably cause the depending package to cease working properly. Therefore, you’ll not often need to use the --nodeps switch.

Get Learning Red Hat Linux 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.