Chapter 4. Searching for RHEL 9 content

The following sections describe how to locate and examine content in the AppStream and BaseOS repositories in Red Hat Enterprise Linux 9:

4.1. Searching for software packages

This section describes steps needed for finding a package providing a particular application or other content.

Procedure

  • To search for a package, use:

    # yum search term

    Replace term with a term related to the package.

    Note that the yum search command returns term matches within the name and summary of the packages. This makes the search faster and enables you to search for packages you do not know the name of, but for which you know a related term.

  • To include term matches within package descriptions, use:

    # yum search --all term

    Replace term with a term you want to search for in a package name, summary, or description.

    Note that the yum search --all command enables a more exhaustive but slower search.

4.2. Listing software packages

The following procedure describes how to list available packages with yum.

Procedure

  • To list information on all installed and available packages, use:

    # yum list --all
  • To list all packages installed on your system, use:

    # yum list --installed

    Alternatively:

    # yum repoquery --installed
  • To list all packages in all enabled repositories that are available to install, use:

    # yum list --available

    Alternatively:

    # yum repoquery

Note that you can filter the results by appending global expressions as arguments. For more details, see Specifying global expressions in yum input.

4.3. Listing repositories

The following procedure describes how to list repositories with yum.

Procedure

  • To list all enabled repositories on your system, use:

    # yum repolist
  • To list all disabled repositories on your system, use:

    # yum repolist --disabled
  • To list both enabled and disabled repositories, use:

    # yum repolist --all
  • To list additional information about the repositories, use:

    # yum repoinfo

Note that you can filter the results by passing the ID or name of repositories as arguments or by appending global expressions. For more details, see Specifying global expressions in yum input.

4.4. Displaying package information

The following procedure describes how to display package information using yum.

Procedure

  • To display information about one or more available packages, use:

    # yum info package-name

    Replace package-name with the name of the package.

    Alternatively:

    # yum repoquery --info package-name

    Replace package-name with the name of the package.

  • To display information about one or more packages installed on your system, use:

    # yum repoquery --info --installed package-name

    Replace package-name with the name of the package.

Note that you can filter the results by appending global expressions as arguments. For more details, see Specifying global expressions in yum input.

4.5. Listing package groups

The following procedure describes how to list package groups using yum.

  • To view the number of installed and available groups, use:

    # yum group summary
  • To list all installed and available groups, use:

    # yum group list

    Note that you can filter the results by appending command line options for the yum group list command (--hidden, --available). For more available options see the man pages.

  • To list mandatory and optional packages contained in a particular group, use:

    # yum group info group-name

    Replace group-name with the name of the group.

Note that you can filter the results by appending global expressions as arguments. For more details, see Specifying global expressions in yum input.

4.6. Listing available modules

The following procedure describes how to find what modules are available and what their details are using yum.

Procedure

  • To list module streams available to your system:

    # yum module list

    The output of this command lists module streams with name, stream, profiles, and summary on a separate line.

  • To display details about a module, including a description, a list of all profiles, and a list of all provided packages:

    # yum module info module-name
  • To list which of these packages are installed by each of module profiles:

    # yum module info --profile module-name
  • To display the current status of a module, including enabled streams and installed profiles:

    # yum module list module-name
  • To find out which modules provide a specific package:

    # yum module provides package

    If the package is available outside any modules, the output of this command is empty.

Additional resources

4.7. Specifying global expressions in yum input

yum commands allow you to filter the results by appending one or more global expressions as arguments. Global expressions must be escaped when passed as arguments to the yum command.

The following procedure describes two ways to ensure global expressions are passed to yum as intended.

Procedure

  • Double-quote or single-quote the entire global expression:

    # yum provides "*/file-name"

    Replace file-name with the name of the file.

    Note that the file-name must be preceeded either by / or */ character sequence to provide the desired outcome.

  • Escape the wildcard characters by preceding them with a backslash (\) character:

    # yum provides \*/file-name

    Replace file-name with the name of the file.

4.8. Additional resources