Appendix A. YUM commands list

This chapter lists YUM commands for listing, installing, and removing content in Red Hat Enterprise Linux 9.

A.1. Commands for listing content in RHEL 9

The following table lists the commonly used YUM commands for finding content and its details in RHEL 9:

CommandDescription

yum search term

Search for a package using term related to the package

yum repoquery package

Search available YUM repositories for a selected package

yum list --all

List information on all installed and available packages

yum list --installed

yum repoquery --installed

List all packages installed on your system

yum list available

yum repoquery

List all packages in all enabled repositories that are available to install

yum repolist

List all enabled repositories on your system

yum repolist --disabled

List all disabled repositories on your system

yum repolist --all

List both enabled and disabled repositories

yum repoinfo

List additional information about the repositories

yum info package-name

yum repoquery --info package_name

Display details of an available package

yum repoquery --info --installed package_name

Display details of a package installed on your system

yum module list

List available modules

yum module info module-name

Display details of a module

yum module info --profile module-name

List packages installed by profiles of a module using the default stream

yum module list module-name

Display the current status of a module

yum module provides package

Determine which modules provide a package.

Note that if the package is available outside any modules, the output of this command is empty.

yum module info --profile module-name:stream

Display packages installed by profiles of a module using a specified stream

yum group summary

View the number of installed and available groups

yum group list

List all installed and available groups

yum group info group-name

List mandatory and optional packages contained in a particular group

A.2. Commands for installing content in RHEL 9

The following table lists the commonly used YUM commands for installing content in RHEL 9:

CommandDescription

yum install package-name

Install a package.

If the package is provided by a module stream, yum resolves the required module stream, and enables it automatically while installing this package. This also happens recursively for all package dependencies. If more module streams satisfy the requirement, the default ones are used.

yum install package-name-1 package-name-2

Install multiple packages and their dependencies simultaneously

yum install package-name.arch

Specify the architecture of the package by appending it to the package name when installing packages on a multilib system (AMD64, Intel 64 machine)

yum install /usr/sbin/binary-file

Install a binary using the path to this binary as an argument

yum install /path/

Install a previously-downloaded package from a local directory

yum module enable module-name

Enable a module using its default stream.

Enable the module when you want to make the packages available to the system but do not currently want to install any of them.

Some modules might not define default streams. In such cases, you must explicitly specify the stream.

yum module enable module-name:stream

Enable a module using a specific stream.

If the module defines a default stream, you can omit the stream and colon.

yum module install module-name

Install a module using the default stream and profiles

Note that some modules do not define default streams.

yum module install module-name:stream

Install a module using a specific stream and default profiles

yum module install module-name:stream/profile

Install a module using a specific stream and profile

yum group install group-name

Install a package group by a group name

yum group install groupID

Install a package group by the groupID

A.3. Commands for removing content in RHEL 9

The following table lists the commonly used YUM commands for removing content in RHEL 9:

CommandDescription

yum remove package-name

Remove a particular package and all dependent packages

yum remove package-name-1 package-name-2

Remove multiple packages and their unused dependencies simultaneously

yum group remove group-name

Remove a package group by the group name

yum group remove groupID

Remove a package group by the groupID

yum module remove --all module-name:stream

Remove all packages from an active stream

yum module remove module-name:stream/profile

Remove packages from an installed profile

yum module remove module-name:stream

Remove packages from all installed profiles within a stream

yum module reset module-name

Reset a module to the initial state

yum module disable module-name

Disable a module and all its streams