en
  English
Phone :  +370 (5) 204-1903
Email: sales@1gbits.com

How to use the yum command in Linux

The yum 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. 

Linux Tutorial Jun 08, 21 by Nisal N 3 min Read
How to use the yum command in Linux

Yum Command

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, 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 pkgs.org 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 pkgs.org and execute it according to the above instruction to install yum into your system.

Conclusion

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.

author img

Nisal N

Computers has always fascinated me since I was a kid and here we are. I love travelling for 2 reasons: the first one to see a new part of the world and second (the most important one) to experience the rich culture hidden among the country and people. I'm pretty good at cooking but very poor when it comes to baking.

Leave A Comment