To 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 nano package by issuing either of the following commands:
rpm -e nano-1.2.1-4rpm -e nano
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.