Fix Yum Command Not Found (4 Ways to fix the issue)

If you are someone that uses any distribution of the Linux operating system, you might know about the yum command. The yum command is mostly used for managing packages. Whether you are installing uninstalling or downgrading a package, the yum command is always used. While we now know why the yum command is important, there have been several reports of the yum command no longer executing and resulting in the yum command not found issue. Today, we will look into various solutions to fix the yum command not found error.

Now, if you dig a bit deeper, there are a number of reasons as to why you would see the yum command not found error message. Thankfully, there are a number of solutions that you can follow to get rid of such errors. We will be listing a number of potential fixes that can help you rid of the yum command not found error message.

Fix Yum Command Not Found

Here are a number of solutions that you can follow to fix the yum command not found error message.

Fix #1: Check type of Linux Distro

To the layperson, every distro of Linux might feel the same. However, there are different versions of Linux distros that are available for the end-user. The yum command will not work on Debian-based Linux distros, simply because in place of the yum command, these Debian-based distros use the apt package manager instead of the yum package manager. If you wanted to know what type of Linux distro you are running, you can follow these steps to find such information.

  1. Open the search console on your Linux PC.
  2. Now, type About in the search box.
  3. In the search results click on About.
  4. The about window will now be displayed.
  5. You will see details of the type of Linux distribution that you are running on your PC.

If you are using any distribution such as Debian,  Ubuntu, or Linux Mint then you will have to go with the apt command instead of the yum command to install packages.

Fix #2: Install yum command utility

Now, if you have checked what Linux distro you are running on and it turns out to be Redhat-based OSs, then you are in luck. You can get back the yum command utility by installing it on your system. You can run either of the two below-mentioned commands in order to get the yum command utility on your Linux PC.

  • $ sudo dnf -y install yum

Or

  • # dnf -y install yum

Avoid using dead or end-of-life OSs

Like every other OS out there, different Linux distros will be having different end-of-life dates. So, if you might be using a version of Linux that has already passed beyond its EOL date, there are high chances you will no longer be able to get the yum command working. Whenever you try to run the yum command, you will simply be displayed the yum command not found error message. Instead, go and get yourself a newer release of any RedHat-based operating systems. The newer the OS, the better your chances of you getting the yum command to work without any errors.

Fix #3: Use dnf instead of yum

Now, with the older versions of Linux, you could use the yum command to manage packages. However, as newer Linux distros are being made available, it only makes enough sense to use newer commands. So, if your Linux distro no longer supports the yum command, simply use dnf in place of yum. The dnf command has become the default for RedHat 8 and Fedora 22.

Fix #4: Check if the $path is correctly set up

Sometimes, there could be issues with the root path files which could be causing the yum command not found error message. The best part about this is that you can easily fix this problem. All you need to do is to enter the command below.

# echo $PATH

Once you hit the enter key, you will now be shown three different default entry paths. If they are the proper ones, then well and good. If not, you might have to make some changes. You can enter the commands below to set up the paths.

# PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin”

# export PATH

Finishing Statement

And this is how you can fix the yum command not found issue on your Linux systems. It is however advisable that you make use of the dnf command instead of yum considering that you will be using a newer and updated version of Linux that no longer supports the yum command. If you have any questions or queries, feel free to leave them in the comments section below.

Related to the Fix Guide:

Share on:
Photo of author

By Joshua D'souza

Enjoys games, 90's hip-hop, and tech. Loves exploring the infinite world of laptops and food. Every ready to provide assistance in anything that rocks his boat. Will gladly enjoy capturing memories through various lenses. Worked previously at PiunikaWeb as an author and researcher.

Leave a Comment