To uninstall a package from the OS, you will simply pass the remove parameter to the yum command:

[root@rac1 Packages]# yum remove rsync
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package rsync.x86_64 0:3.0.6-9.el6 will be erased
--> Finished Dependency Resolution
Repository rhel-source is listed more than once in the configuration
Repository rhel-source-beta is listed more than once in the configuration

Dependencies Resolved

==============================================================================================================================================================================
 Package                    Arch                        Version                            Repository                                                                    Size
==============================================================================================================================================================================
Removing:
 rsync                      x86_64                      3.0.6-9.el6                        @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4                      682 k

Transaction Summary
==============================================================================================================================================================================
Remove        1 Package(s)

Installed size: 682 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : rsync-3.0.6-9.el6.x86_64                                                                                                                                   1/1 
  Verifying  : rsync-3.0.6-9.el6.x86_64                                                                                                                                   1/1 

Removed:
  rsync.x86_64 0:3.0.6-9.el6                                                                                                                                                  

Complete!

Yum can be leveraged to remove multiple packages at the same time by adding more package names to the command syntax. Yum is not capable of removing packages with dependencies. We can only perform this kind of operation with the RPM command and is not advised as we can potentially introduce instability and leave the system in a non-functioning state.

Posted in Linux
Share this post, let the world know

Comments are closed