Red Hat Training

A Red Hat training course is available for RHEL 8

Chapter 3. Finding RHEL 8 content

In the following sections, learn how to locate and examine content in the AppStream and BaseOS repositories in Red Hat Enterprise Linux 8 by using YUM:

3.1. Searching for a package

To find a package providing a particular application or other content, complete the following steps.

Procedure

  1. Search for a package with a text string, such as application name:

    $ yum search "text string"
  2. View details about a package:

    $ yum info package

3.2. Listing available modules and their content

To find out which modules are available and what their details are, complete the following steps.

Procedure

  • To list module streams available to your system, use:

    $ 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, use:

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

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

    $ yum module list module-name

Additional resources

Example 3.1. Finding out details about a module

The following is an example of how to list available modules in the AppStream repository and how to obtain information about the postgresql module’s contents.

Note

The outputs in this example have been edited for brevity. Actual outputs might contain more information than shown here.

  1. List available modules:

    $ yum module list
    Name         Stream   Profiles    Summary
    (...)
    postgresql   9.6      client,     PostgreSQL server and client module
                          server [
                          d]
    postgresql   10 [d]   client,     PostgreSQL server and client module
                          server [
                          d]
    postgresql   12       client,     PostgreSQL server and client module
                          server [
                          d]
    postgresql   13       client,     PostgreSQL server and client module
                          server [
                          d]
    postgresql   15       client,     PostgreSQL server and client module
                          server [
                          d]
    (...)
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
  2. Examine details of the postgresql module:

    $ yum module info postgresql
    
    ...
    Name             : postgresql
    Stream           : 10 [d][a]
    Version          : 8070020221124143148
    Context          : bd1311ed
    Architecture     : x86_64
    Profiles         : client, server [d]
    Default profiles : server
    Repo             : rhel-AppStream
    Summary          : PostgreSQL server and client module
    ...
    
    
    Name             : postgresql
    Stream           : 12
    Version          : 8060020221003080350
    Context          : ad008a3a
    Architecture     : x86_64
    Profiles         : client, server [d]
    Default profiles : server
    Repo             : rhel-AppStream
    Summary          : PostgreSQL server and client module
    ...
    
    Name             : postgresql
    Stream           : 13
    Version          : 8070020230227142544
    Context          : bd1311ed
    Architecture     : x86_64
    Profiles         : client, server [d]
    Default profiles : server
    Repo             : rhel-AppStream
    Summary          : PostgreSQL server and client module
    ...
    
    Name             : postgresql
    Stream           : 15
    Version          : 8080020230212204728
    Context          : fd72936b
    Architecture     : x86_64
    Profiles         : client, server [d]
    Default profiles : server
    Repo             : rhel-AppStream
    Summary          : PostgreSQL server and client module
    ...
    
    Name             : postgresql
    Stream           : 9.6
    Version          : 8040020210602182503
    Context          : 522a0ee4
    Architecture     : x86_64
    Profiles         : client, server [d]
    Default profiles : server
    Repo             : rhel-AppStream
    Summary          : PostgreSQL server and client module
    ...
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled, [a]ctive

    If you do not specify any stream, yum lists all available streams.

  3. Examine profiles available in stream 10 of the postgresql module:

    $ yum module info --profile postgresql:10
    (...)
    Name   : postgresql:10:8070020221124143148:bd1311ed:x86_64
    client : postgresql
    server : postgresql-server

    Note that each of the profiles installs a different set of packages, including their dependencies.

  4. Install the postgresql module by using the default stream 10 and the default profile server:

    # yum module install postgresql
    ...
    Dependencies resolved.
    ===================================================================================================================
     Package                  Architecture  Version                                        Repository             Size
    ===================================================================================================================
    Installing group/module packages:
     postgresql-server        x86_64        10.23-1.module+el8.7.0+17280+3a452e1f          rhel-AppStream        5.1 M
    Installing dependencies:
     libpq                    x86_64        13.5-1.el8                                     rhel-AppStream        198 k
     postgresql               x86_64        10.23-1.module+el8.7.0+17280+3a452e1f          rhel-AppStream        1.5 M
    Installing module profiles:
     postgresql/server
    Enabling module streams:
     postgresql                             10
    
    Transaction Summary
    ===================================================================================================================
    Install  3 Packages
    
    Total download size: 6.7 M
    Installed size: 26 M
    Is this ok [y/N]: y
    ...
    
    Installed:
      libpq-13.5-1.el8.x86_64
      postgresql-10.23-1.module+el8.7.0+17280+3a452e1f.x86_64
      postgresql-server-10.23-1.module+el8.7.0+17280+3a452e1f.x86_64
    
    Complete!
  5. Inspect the current status of the postgresql module:

    $ yum module list postgresql
    rhel-AppStream
    Name                Stream             Profiles                        Summary
    postgresql          9.6                client, server [d]              PostgreSQL server and client module
    postgresql          10 [d][e]          client, server [d] [i]          PostgreSQL server and client module
    postgresql          12                 client, server [d]              PostgreSQL server and client module
    postgresql          13                 client, server [d]              PostgreSQL server and client module
    postgresql          15                 client, server [d]              PostgreSQL server and client module
    
    Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

    The output shows that the default stream 10 is enabled and its profile server is installed.

3.3. Commands for listing content

The following are the commonly used commands for finding content and its details in Red Hat Enterprise Linux 8.

CommandDescription

yum list available

List available packages.

yum repoquery package

Search available YUM repositories for a selected package.

yum search "text string"

Search for a package by using arbitrary text string.

yum info package

Display details for a package.

yum module provides package

Display which modules provide a package.

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

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 by using the default stream.

yum module info --profile module-name:stream

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

yum module list module-name

Display the current status of a module.