Fixing Problems with YUM

YUM is the package manager of choice for many Linux distributions, particularly Red Hat Enterprise Linux, CentOS, and Fedora. Other RHEL-based distributions also use YUM. When using a dedicated server, such as those offered by hosting company, you will most likely manage packages from the command line via SSH.

YUM has a robust command line interface that allows you to update packages, install new ones, and delete ones you no longer need. When it works properly, YUM can be a thing of beauty, but like any software, it can sometimes give you errors. Here are a few common errors and ways to fix them.

Sometimes, after running an update, you will get dependency errors, indicating that some of the updates were not completed correctly. One simple command can usually fix those errors:

yum clean all

This will clean out everything that may not be updated and refresh the YUM database to work correctly for you.

yum clean packages” specifically removes cached packages from the system.

“yum clean headers” removes files that determine which packages are available and forces YUM to download new headers.

If you are having other problems, such as YUM not being able to locate the baseurl for a repository, you may need to check that any third-party repositories you have enabled are still valid.

With a little investigation and patience, you should be able to fix any basic problems with YUM, without much effort. For more information about YUM, you can read the full documentation online.