CentOS /RHEL:Yum Uninstall RPM Packages
I would like to uninstall a rpm package via “yum” command under centos / RHEL /Fedora system. How do I remove the rpm packages using yum? How to use YUM uninstall RPM Packages?
You need to use “yum remove” command to erase the specified packages from system as well as removing any packages which depend on the package being removed.
Yum Uninstall RPM Packages
To uninstall one rpm package by run the followong command:
yum remove <package name>
For example remove a package named “wget”, enter:
[root@devops Desktop]# yum remove wget Loaded plugins: fastestmirror, langpacks Resolving Dependencies --> Running transaction check ---> Package wget.x86_64 0:1.14-10.el7_0.1 will be erased --> Processing Dependency: wget for package: ipa-client-3.3.3-28.el7.centos.x86_64 --> Running transaction check ---> Package ipa-client.x86_64 0:3.3.3-28.el7.centos will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: wget x86_64 1.14-10.el7_0.1 @updates 2.0 M Removing for dependencies: ipa-client x86_64 3.3.3-28.el7.centos @anaconda 329 k Transaction Summary ================================================================================ Remove 1 Package (+1 Dependent package) Installed size: 2.3 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : ipa-client-3.3.3-28.el7.centos.x86_64 1/2 Erasing : wget-1.14-10.el7_0.1.x86_64 2/2 Verifying : ipa-client-3.3.3-28.el7.centos.x86_64 1/2 Verifying : wget-1.14-10.el7_0.1.x86_64 2/2 Removed: wget.x86_64 0:1.14-10.el7_0.1 Dependency Removed: ipa-client.x86_64 0:3.3.3-28.el7.centos Complete!
To uninstall multiple rpm package at once, you need to specifiy all package names to yum remove command or using glob expression, type:
yum remove <package name1> <package name2> yum remove <glob expression>
Example: removing two rpm packages: wget and httpd, issue the following command:
yum remove wget httpd