Test your skills on our all Hosting services and get 15% off!

Use code at checkout:

"Skills"
09.08.2024

A short Guide to Working with YUM in Linux

Yellowdog Updater, Modified (abbreviated YUM) is a package manager used in RPM (Red Hat Package Manager)-based Linux distributions such as CentOS, Fedora, and RHEL (Red Hat Enterprise Linux). YUM makes it easy to install, update, remove, and manage software packages. In this article, we will cover the basic commands and principles of YUM, which will help you effectively manage packages on your Linux system.

Installing Packages

Perhaps one of the main and most frequently used tasks and processes of the YUM package manager is installing software. The yum install command is used for this. Let’s look at an example of installing the nginx web server

sudo yum install nginx

After executing this command, YUM will automatically find all the dependencies needed to install nginx, download and install them.

Searching for packages

Before installing a package, you can use the yum search command to search the repositories for it. For example, to search for a package associated with the word “website”:

yum search website

This command will return a list of all packages that contain the keywords “web server” in their description or name.

Updating packages

YUM also allows you to update installed packages to the latest version. To update a specific package, use the yum update command with the package name:

sudo yum update nginx

If you want to update all packages on your server, simply run the command without specifying the package:

sudo yum update

This command will update all packages to the latest available version.

Removing packages

If you need to remove a package from your system, use the yum remove command. For example, to remove the httpd package:

sudo yum remove nginx

YUM will automatically remove the package and any dependencies that are no longer used by other installed programs.

Clearing the cache

YUM stores downloaded packages and information about them in a cache. This speeds up your system, but over time the cache can take up a significant amount of space. To clear the cache, use the yum clean command. Clearing all cached data is done with the following command:

sudo yum clean all

This command removes all files from the cache, including repository lists and downloaded packages.

Test your skills on our all Hosting services and get 15% off!

Use code at checkout:

"Skills"