August 11, Last Updated: The example commands shown in this article are practically tested on our CentOS 6. The basic requirement of this article is, you must have a basic understanding of commands and a working Linux operating system, where you can explore and practice all the commands listed below.
It allows users and system administrator to easily install, update, remove or search software packages on a systems. It was developed and released by Seth Vidal under GPL General Public License as an open source, means anyone can allowed to download and access the code to fix bugs and develop customized packages. YUM uses numerous third party repositories to install packages automatically by resolving their dependencies issues.
Install a Package with YUM To install a package called Firefox 14 , just run the below command it will automatically find and install all required dependencies for Firefox. The above command will ask confirmation before installing any package on your system. If you want to install packages automatically without asking any confirmation, use option -y as shown in below example.
Removing a Package with YUM To remove a package completely with their all dependencies, just run the following command as shown below.
Same way the above command will ask confirmation before removing a package. To disable confirmation prompt just add option -y as shown in below. Just run the following command it will automatically resolves all dependencies issues and install them. For example to search for a package called openssh, use the command. For example to search for a specific version openssh For example, to search all the packages that matches the word. A robust log colorizer pure-ftpd-selinux.
To get information of a package just issue the below command. Mozilla Firefox is an open-source web browser, designed for standards: List all Installed Packages using YUM To list all the installed packages on a system, just issue below command, it will display all the installed packages. Yum Provides Function Yum provides function is used to find which package a specific file belongs to. Check for Available Updates using Yum To find how many of installed packages on your system have updates available, to check use the following command.
Update System using Yum To keep your system up-to-date with all security and binary package updates, run the following command. It will install all latest patches and security updates to your system.
List all available Group Packages In Linux, number of packages are bundled to particular group. Instead of installing individual packages with yum, you can install particular group that will install all the related packages that belongs to the group.
For example to list all the available groups, just issue following command. Install a Group Packages To install a particular package group, we use option as groupinstall. Update a Group Packages To update any existing installed group packages, just run the following command as shown below.
Remove a Group Packages To delete or remove any existing installed group from the system, just use below command. List Enabled Yum Repositories To list all enabled Yum repositories in your system, use following option. List all Enabled and Disabled Yum Repositories The following command will display all enabled and disabled yum repositories on the system.
Install a Package from Specific Repository To install a particular package from a specific enabled or disabled repository, you must use —enablerepo option in your yum command. For example to Install PhpMyAdmin 3. Interactive Yum Shell Yum utility provides a custom shell where you can execute multiple commands.
View History of Yum To view all the past transactions of yum command, just use the following command. If anything related to yum commands may have missed out. Please update us through our comment box.