How to Update YUM in Linux

Abid Ullah Feb 15, 2024
  1. the yum update Command in Linux
  2. Install a Package With the yum Command
  3. Remove a Package With the yum Command
  4. Update a Package by Using the yum Command
  5. Get Information About Any Package Using the yum Command
  6. Difference Between yum update and yum upgrade
How to Update YUM in Linux

This article will teach us how to update YUM in Linux and install, update, remove, find, and manage packages on Linux systems. We also see the difference between yum update and yum upgrade in Linux.

the yum update Command in Linux

The yum update command (yellow-dog updater modified) is an open-source command used in Linux. Using the yum update, we can easily install, update, and remove packages on a Linux system.

Let’s understand how we can use the yum command for different purposes in Linux. Before using the yum update command, we need to install the yum update package by using the following commands.

Step 1:

$ sudo apt-get update -y

Step 2:

$ sudo apt -y install yum

After running the above commands, the yum update package will be installed on your Linux system.

yum update command in linux

Install a Package With the yum Command

If we want to install a package called Firefox, we can do it using the yum command. The following yum command will automatically find and install the required Firefox package.

$ yum install Firefox

The above command will ask the user for confirmation before installing the Firefox package on the system. If we want to avoid this and install the package automatically without asking for confirmation, we need to use this -y option as shown below.

$ yum -y install firefox

Remove a Package With the yum Command

We can remove any package with the yum command in Linux. If we want to remove the Firefox package we installed, we use the following command.

$ yum -y remove firefox

The above command will remove the Firefox package with all the dependencies. We also used the -y option here.

Running this command, it will not ask for confirmation before removing the package.

Update a Package by Using the yum Command

We can also update any package in Linux using the yum command.

For example, we have a package named MySQL, which we want to update to the latest version. We can update it to the latest version using the command below.

$ yum update mysql

Get Information About Any Package Using the yum Command

Using the yum command, we can also get information about any package before installing it.

For example, we want to install the Firefox package on Linux and know about the package first. We can get information about the Firefox package by running the following command.

$ yum info Firefox

Difference Between yum update and yum upgrade

The yum update command updates all the installed packages to the latest versions available in the repositories, and the yum upgrade command performs the same action.

The difference between these commands is that when we use the yum upgrade command, it removes all of the obsolete packages from the system after the package is installed, while the yum update does not remove the obsolete packages from the system after the package is installed.

I hope you find this article helpful in understanding the use of the yum update command and the difference between the yum update and yum upgrade in Linux.

Author: Abid Ullah
Abid Ullah avatar Abid Ullah avatar

My name is Abid Ullah, and I am a software engineer. I love writing articles on programming, and my favorite topics are Python, PHP, JavaScript, and Linux. I tend to provide solutions to people in programming problems through my articles. I believe that I can bring a lot to you with my skills, experience, and qualification in technical writing.

LinkedIn