Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 3. Searching for RHEL content


In the following sections, learn how to locate and examine content in the AppStream and BaseOS repositories by using the DNF software management tool.

3.1. Searching for software packages

To identify which package provides the software you require, you can use DNF to search the repositories.

Procedure

  • Depending on your scenario, use one of the following options to search the repository:

    • To search for a term in the name or summary of packages, enter:

      $ dnf search <term>
      Copy to Clipboard Toggle word wrap
    • To search for a term in the name, summary, or description of packages, enter:

      $ dnf search --all <term>
      Copy to Clipboard Toggle word wrap

      Note that searching additionally in the description by using the --all option is slower than a normal search operation.

    • To search for a package name and list the package name and its version in the output, enter:

      $ dnf repoquery <package_name>
      Copy to Clipboard Toggle word wrap
    • To search for which package provides a file, specify the file name or the path to the file:

      $ dnf provides <file_name>
      Copy to Clipboard Toggle word wrap

3.2. Listing software packages

You can use DNF to display a list of packages and their versions that are available in the repositories. If required, you can filter this list and, for example, only list packages for which updates are available.

Procedure

  • List the latest versions of all available packages, including architectures, version numbers, and the repository they where installed from:

    $ dnf list --all
    ...
    postgresql.x86_64            16.4-1.el10      rhel-AppStream
    postgresql-contrib.x86_64    16.4-1.el10      rhel-AppStream
    postgresql-docs.x86_64       16.4-1.el10      rhel-AppStream
    postgresql-jdbc.noarch       42.7.1-6.el10    rhel-AppStream
    ...
    Copy to Clipboard Toggle word wrap

    The @ sign in front of a repository indicates that the package in this line is currently installed.

    Alternatively, to display all available packages, including version numbers and architectures, enter:

    $ dnf repoquery
    ...
    postgresql-0:16.4-1.el10.x86_64
    postgresql-contrib-0:16.4-1.el10.x86_64
    postgresql-docs-0:16.4-1.el10.x86_64
    postgresql-jdbc-0:42.7.1-6.el10.noarch
    postgresql-odbc-0:16.00.0000-4.el10.x86_64
    ...
    Copy to Clipboard Toggle word wrap

    Optionally, you can filter the output by using other options instead of --all, for example:

    • Use --installed to list only installed packages.
    • Use --available to list all available packages.
    • Use --upgrades to list packages for which newer versions are available.

3.3. Displaying package information

You can query DNF repositories to display further details about a package, such as the following:

  • Version
  • Release
  • Architecture
  • Package size
  • Description

Procedure

  • Display information about one or more available packages:

    $ dnf info <package_name>
    Copy to Clipboard Toggle word wrap

    This command displays the information for the currently installed package and, if available, its newer versions that are in the repository. Alternatively, use the following command to display the information for all packages with the specified name in the repository:

    $ dnf repoquery --info <package_name>
    Copy to Clipboard Toggle word wrap

3.4. Listing package groups and packages they provide

Package groups bundle multiple packages, and you can use package groups to install all packages assigned to a group in a single step. However, before the installation, you must identify the name of the required package group.

Procedure

  1. List both installed and available groups:

    $ dnf group list
    Copy to Clipboard Toggle word wrap

    Note that you can filter the results by appending the --installed and --available option to the dnf group list command. By using the --hidden option, you can display hidden groups in the output.

  2. List mandatory, optional, and default packages contained in a particular group:

    $ dnf group info "<group_name>"
    Copy to Clipboard Toggle word wrap
  3. Optional: View the number of installed and available groups:

    $ dnf group summary
    Copy to Clipboard Toggle word wrap

3.5. Listing repositories

To get an overview of repositories that are enabled and disabled on your system, you can list them.

Procedure

  1. List all enabled repositories on your system:

    $ dnf repolist
    Copy to Clipboard Toggle word wrap

    To display only certain repositories, append one of the following options to the command:

    • Append --disabled to list only disabled repositories.
    • Append --all to list both enabled and disabled repositories.
  2. Optional: List additional information about the repositories:

    $ dnf repoinfo <repository_name>
    Copy to Clipboard Toggle word wrap

3.6. Specifying global expressions in DNF input

You can filter the results of dnf commands by appending one or more global expressions as arguments.

Procedure

  • Use one of the following methods if you use global expressions in dnf commands:

    • Enclose the entire global expression in single or double quotation marks:

      # dnf provides "*/<file_name>"
      Copy to Clipboard Toggle word wrap

      Note that you must precede <file_name> either by / for an absolute path or */ to use a wildcard if the full path is unknown.

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

      # dnf provides \*/<file_name>
      Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat