Home > Linux / Unix > YUM Commands Examples in Linux

YUM Commands Examples in Linux

YUM Commands Examples in Linux

YUM is known as Yellowdog Updater Modified.it is an open source command line argument as well as a graphical based package management tool for RPM.

YUM commands allow the user and system administrator to install, update, remove and search software packages on the operating system.

It was developed by Seth Vidal and released by GPL as an open source software, means anyone can be allowed to download and access the code to fix their bugs and develop customized packages as well.

YUM Commands uses the number of third-party repositories to install packages automatically by resolving their dependencies issues.

1. Install a Package using YUM

To install a package name Firefox, you just need to run the below command it will automatically find and install all required dependencies for Firefox at a time.

yum install httpd

Above command ask confirmation while installation.If you want to install packages automatically, use option -y as shown in below example.

yum -y install httpd

2. Removing a Package using YUM

To remove a package complete with their dependencies. It will ask for your confirmation.

yum remove httpd

We can remove without confirmation by using option -y as shown in below.

yum -y remove httpd

3. Updating a Package with YUM

By using below command we can update Firefox package. it will automatically resolve all dependencies issues and install them perfectly.

yum update firefox

4. List a Package with YUM

 The list function use to search for the specific package by the name.

yum list Firefox

5. Search for a Package with YUM

If we forget the exact name of the package, then we can use the search function to find out all the available packages to match the name of the package.

yum search vsftpd

6. Get Information of a Package with YUM

To get information of a package,we use below command.

yum info Mysql

7. List all Available Packages with YUM

To list all the available packages in the Yum.

yum list | less

8. List all Installed Packages with YUM

List all the installed packages on the system, 

# yum list installed | less

it will display all the installed packages.

9.Provides Function with Yum

By using Yum provides the function ,we can find out which package a specific file belongs to.

For example, If we want to know the name of the package that has the /etc/httpd/conf/httpd.conf.

yum provides /etc/httpd/conf/httpd.conf

10. Check for Available Updates with Yum

We can find out how many of installed packages on our system have updates available.

yum check-update

11. Update System with Yum

By using below command we can update all packeage. It will install all latest patches and security updates to our system.

yum update

12. List all available Group Packages with yum

The number of packages are bundled to the particular group. Instead of installing one by one we can install all at a time which belongs to the group.

yum grouplist

13. Install a Group Packages

To install a group package groupinstall function.

yum groupinstall ‘MySQL Database’

14. Update a Group Packages

To update installed group packages.

yum groupupdate ‘DNS Name Server’

15. Remove a Group Packages

To remove installed group from OS.

yum groupremove ‘DNS Name Server’

16. List Enabled Yum Repositories

To list all enabled Yum repositories in our OS.

yum repolist

17. List all Enabled and Disabled Yum Repositories

it shows all the enabled as well as disabled yum repositories on the OS.

 yum repolist all

18. Install a Package from Specific Repository

To install package from a particular enabled or disabled repository, We must use this option.–enablerepo 

yum –enablerepo=epel install phpmyadmin

19. Interactive Yum Shell with yum

Yum utility provides us with a custom shell where we can execute commands.

 yum shell

20. Clean Yum Cache

By default yum keeps all the repository enabled package data in /var/cache/yum/ with each sub-directory, to clean all cached files from the enabled repository. To clean it we use below command.

yum clean all

21. View History of Yum

To view all the history of yum command, 

 yum history

We are group of application developer and admin.We are providing good content of information about IT technology and services .

Leave a Reply

Your email address will not be published. Required fields are marked *