The yum command is an rpm-focused automated package manager. It will perform code maintenance automatically based on "repository" metadata, including dependency analysis and redundant processing.

It can also add new packages, remove old ones, and query the installed and usable packages, among other things. Some high-level kit developers are similar to yum, such as apt-get and smart. So in this article, we will give you complete details on using the yum command in the Linux operating system. 

Yum Command in Linux

The most often used solutions as seen in the examples below.

  1. Install any sample xyz kit from the system's repository:

# yum install xyz

  1. Install any package from the local directory:

# yum localinstall pkg.rpm

  1. You may also use a specific FTP website to install a package:

# yum localinstall website_package_link

  1. To replace any missing files, reinstall the latest version of the package nfs-utils:

# yum reinstall nfs-utils

  1. Install all of the packages in the "Web server" group:

# yum groupinstall "Webserver"

Package removal

To delete packages, you can use the yum command.

  1. vsftpd and all its dependencies are being removed from the system by using the below command:

# yum remove vsftpd

You may also use the erase function, which works similarly to remove.

  1. Another option, autoremove, which was implemented in RHEL 7, can be used to delete a package along with other not needed packages:

# yum autoremove httpd

  1. Using the swap option to uninstall one kit and add another with a single command:

# yum swap vsftpd iftp

Upgrading and Downgrading Kits 

  1. To upgrade all of the packages on the system [yum upgrade], use the command given below:

# yum update

  1. To upgrade a particular package, such as httpd, use the following commands:

# yum update httpd

  1. To restore a package to a previous edition, follow these steps:

# yum downgrade pkg_name

If you don't Want to Interact while Using Yum

Or used for every yum button, the -y option implies yes for any query and makes a non-interactive use of the yum command. It can be a club with any of the functions we've already used. It's particularly helpful in the following situations:

yum update -y

Yum command not found?

yum is an integrated package manager focused on rpms. Based on "repository" metadata, it can execute code maintenance automatically, including dependency analysis and redundant processing. It may also add new packages, remove old packages, and query the installed and/or usable packages, among a variety of other commands/services. Some high-level kit developers, such as apt-get and smart, are similar to yum.

  1. Go to for more information and download the yum package.
  2. Look for the yum rpm package for the Rhel version and architecture (x86 or x86 64).
  3. The rpm kit can be downloaded from the website.
  4. Su -c 'rpm -i /Downloads/*.rpm or the graphical file manager should be used to install it.

 If the yum command is not found in your system you can download it from and execute it according to the above instruction to install yum into your system.


In the above information, we explain how you can use the yum command and the various option commands associated with the yum command. We can easily remove, update, downgrade and install packages with yum. If you want a non-interactive session with yum, you can use the -y command. You can also buy linux vps to practice it on a routine basis.

People also read: