Operations 5 min read

Mastering yum: Essential Commands and Options for RPM Package Management

This guide explains yum, the RPM‑based package manager used in Fedora, Red Hat and SUSE, covering its purpose, command syntax, key options, parameter meanings, and practical examples for installing, updating, searching, and cleaning packages.

Open Source Linux
Open Source Linux
Open Source Linux
Mastering yum: Essential Commands and Options for RPM Package Management

yum: RPM‑based Package Manager

Feature Description

yum is the command‑line package manager based on RPM used in Fedora, Red Hat and SUSE.

It can install, update, remove, list, and display packages and package groups. yum automatically resolves dependencies by analyzing repository metadata and can perform system updates.

Command Syntax

yum [options] [arguments]

Option Meanings

-y : answer “yes” to all prompts

-c : specify configuration file

-q : quiet mode

-v : verbose mode

-t : check external errors

-d : set debug level (0‑10)

-e : set error level (0‑10)

-R : set maximum wait time for a yum command

-R : run completely from cache without downloading headers

-h : display help information

Parameter Meanings

install : install an rpm package

update : update an rpm package

check-update : check for available updates

remove : delete specified rpm package

list : show package information

search : search for packages

info : display description and summary of a package

clean : clean expired yum cache

shell : enter yum shell prompt

resolvedep : show package dependencies

localinstall : install a local rpm package

localupdate : update a local rpm package

deplist : list all dependencies of a package

Reference Examples

Note: To use yum, you must first configure a yum repository.

Example 1 – Installation

yum install package1          # install specified package1
yum -y install package1       # install without confirmation
yum groupinstall group1       # install a package group
yum install                  # install all packages

Example 2 – Update and Upgrade

yum update package1          # update specified package1
yum check-update             # check for upgradable packages
yum upgrade package1          # upgrade specified package1
yum groupupdate group1       # upgrade a package group
yum update                   # update all packages

Example 3 – Search and Display

# check if ftp is installed
yum list installed | grep ftp
yum list installed ftp*

yum info package1           # show information of package1
yum list                    # list all installed and available packages
yum list package1           # show status of specified package1
yum groupinfo group1        # show information of a package group
yum search string           # search packages by keyword
yum deplist package1        # show dependencies of package1
yum repolist                # list configured repositories
yum version                 # show yum version

Example 4 – Removal

yum remove package1          # delete package1
yum groupremove group1       # delete a package group

Example 5 – Cache Management

yum clean packages          # remove package files from cache
yum clean headers           # remove header files from cache
yum clean all               # clear all cache
yum makecache               # generate repository metadata cache
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem Administrationpackage managementRPMyum
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.