What is YUM and how to use it

W

Yum is a utility for RedHat and Fedora Core Linux based distributions. It is used to install packages directly from the Internet including the ability to update them. The only thing required to use yum is a reliable internet connection to download and install packages as quickly as possible.

The RedHat and Fedora Core-based systems come with the yum utility available. It also contains a list of repositories from where to download the packages. Like RPM and DPKG, yum is used to install, uninstall and update packages from the operating system.

YUM configuration files can be edited to cater to any needs, you can select only certain services or applications for which updates can be made, or you can exclude those updates for specific services or applications. In RHEL/CentOS 6/CentOS 7, yum has the ability to rollback, install, update, or delete packages. The rollback option would help us if we introduced an update that went wrong or removed a package.

The /etc/yum.repos.d/ directory contains repositories where yum looks for updates or recent versions of applications already installed on the server. Each of these files can be edited, enabled, or disabled. To enable such a software archive, you must set in the configuration file enable = 1; if you want to disable, you must set enable = 0;

Once disabled, yum ignores the archive and will not search for it anymore. The archive configuration file stays on your computer, and if you want to exclude that archive altogether, you can simply delete the configuration file.

If you have installed specific applications and then accidentally deleted certain apps, some old files may remain in the cache created by yum. To make sure there are no errors in running the yum application, you can delete the cache using the command:
yum clean all

Before we start using yum, we recommend updating the list of packages using the command:
yum check-update

And then we can install the packages using the command:
yum install software name

If we want to delete a package that we installed earlier we use the option to remove:
yum remove software name

We can also get information about a package already installed using the syntax info:
yum info software

or we can get a list of valid updates:
yum list updates

We can also update all the packages we have installed using the command:
yum update

YUM only works when logged in as root and is a handy utility for managing packages in Redhat or Fedora core operating systems. It is recommended to use it whenever you need a package because you receive the newest version.

To search for a specific package, use the following command:
yum search software

You can get valuable information about a package using the following command:
yum info software

The returned information is as follows:
Name
Architecture
version
Summary
URL
License
Description

If you prefer a more graphic solution, I recommend you choose YUM Extender. YUM is for RedHat and Fedora what apt-get is for Debian and Ubuntu.

Recent Posts

Archives

Categories