Home > Other External Packages > yum

yum: RPM Package Management

yum (Yellowdog Updater, Modified) is a command-line package management utility used on RPM-based Linux systems for software package installation, updates, removal, and dependency resolution. It automates these tasks, making it easier for users to manage software. It was widely used in CentOS, RHEL, and older versions of Fedora.

Overview

yum acts as a front-end for the RPM package management system, enabling users to search for and install packages from remote repositories, automatically handling necessary dependencies. This is significantly more convenient and safer than managing RPM files manually.

Key Features

  • Package installation and updates
  • Package removal
  • Package search and information retrieval
  • Automatic resolution of system dependencies
  • Repository management

Key Options

The yum command provides various subcommands and options to perform different tasks.

Package Management

Information Retrieval

Other

Generated command:

Try combining the commands.

Description:

`yum` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Common tasks that can be performed using the yum command.

Install Nginx Package

sudo yum install nginx

Installs the Nginx web server package.

Update All Packages on the System

sudo yum update

Updates all installed packages to their latest versions.

Remove Apache HTTP Server Package

sudo yum remove httpd

Removes the httpd package from the system.

Search for MySQL Related Packages

yum search mysql

Searches for packages whose name or description contains 'mysql'.

Check Nginx Package Information

yum info nginx

Displays detailed information about the Nginx package (version, repository, description, etc.).

List All Installed Packages

yum list installed

Outputs a list of all packages currently installed on the system.

Clean Yum Cache

sudo yum clean all

Clears all downloaded package and metadata caches to free up disk space.

Tips & Notes

Useful tips and points to note when using yum.

Transition to dnf

  • In recent versions of RHEL, CentOS Stream, and Fedora, dnf is used as the default package manager instead of yum. dnf has a similar syntax to yum and offers improved performance and dependency resolution capabilities. Existing yum commands are often symlinked to dnf for compatibility.

Repository Management

  • yum manages repositories through `.repo` files located in the `/etc/yum.repos.d/` directory. When adding external repositories, ensure they are from trusted sources.

Security Updates

  • It is important to regularly run `sudo yum update` to address system security vulnerabilities and maintain the latest features.

Same category commands