Essential YUM Package Manager Commands for Linux Administration

YUM (Yellowdog Updater Modified) is a powerful package manager for RPM-based Linux distributoins. Understanding its core commands is crucial for effective system administration.

Package Discovery Operations

The following commands help locate available packages on configured repositories:

// Display all packages available in configured repositories
yum list

// Show packages beginning with specific prefix
yum list nginx*

// Filter packages containing specific term
yum list | grep mysql

These commands query repositories defined in /etc/yum.repos.d/ directory for available software packages.

Search Functionality

Alternative method for finding related packages:

// Locate packages related to specified term
yum search apache

// Equivalent to previous filtering approach
yum search httpd

Package Installation Procdeures

Installing software packages with various options:

// Standard installation with confirmation prompts
yum install package_name

// Automated installation without user interaction
yum -y install package_name

// Enable specific repository during installation
yum --enablerepo=epel install package_name -y

// Install multiple packages from specified repositories
yum --enablerepo=remi,remi-php74 install package1 package2 package3 -y

When using the -y flag, all confirmation prompts are automatically answered affirmatively. Package names can be discovered through search operations mentioned earlier.

For optimal compatibility, install related packages from the same repository source. For example, PHP extensions should originate from the same repository as the main PHP package to avoid dependency conflicts.

System Updates

Update operations require careful consideration:

// Update all system packages (includes kernel - use cautiously)
yum [-y] update

// Update specific package only
yum [-y] update package_name

Complete system updates affect all installed packages, including the Linux kernel. Kernel updates may require local console access for proper configuration and boot sequence setup. Remote server updates involving kernel changes can result in boot failures.

Package Removal

Uninstalling software packages:

// Remove specific package
yum remove package_name

// Remove all packages matching pattern
yum remove python*

Installed Package Information

View currently installed software:

// List all installed packages
yum list installed

// Filter installed packages by keyword
yum list installed | grep php

// Alternative verification method
yum info package_name

Detailed Package Information

Retrieve comprehensive package details:

sudo yum info php
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
 * base: mirrors.example.com
 * epel: mirror.example.net
 * extras: mirror.example.org
 * remi-safe: mirror.example.asia
 * updates: mirror.example.hk
Installed Packages
Name        : php
Arch        : x86_64
Version     : 7.4.15
Release     : 1.el7.remi
Size        : 12 M
Repo        : installed           // Indicates package status
From repo   : remi-php74          // Source repository
Summary     : PHP scripting language for creating dynamic web sites
URL         : http://www.php.net/
License     : PHP and Zend and BSD and MIT
Description : PHP is an HTML-embedded scripting language designed for
            : web development. It provides database integration capabilities
            : and simplifies creation of dynamic web content.

The output shows installation status, repository source, version information, and detailed package description.

Tags: Yum Linux package-management rpm centos

Posted on Wed, 30 Sep 2026 16:41:09 +0000 by champbronc2