Product SiteDocumentation Site

1.2. Packages and Package Groups

1.2.1. Searching, Listing and Displaying Package Information

You can search all RPM package names, descriptions and summaries by using the yum search <term> [more_terms ] command. yum displays the list of matches for each term:
~]# yum search meld kompare
Loaded plugins: presto, refresh-packagekit, security
=============================== Matched: kompare ===============================
kdesdk.x86_64 : The KDE Software Development Kit (SDK)
komparator.x86_64 : Kompare and merge two folders
================================ Matched: meld =================================
meld.noarch : Visual diff and merge tool
python-meld3.x86_64 : An HTML/XML templating system for Python

yum search is useful for searching for packages you do not know the name of, but for which you know a related term.

Listing Packages

yum list and related commands provide information about packages, package groups, and repositories.

Tip: Filtering Results with Glob Expressions

All of Yum's various list commands allow you to filter the results by appending one or more glob expressions as arguments. Glob expressions are normal strings of characters which contain one or more of the wildcard characters * (which expands to match any character multiple times) and ? (which expands to match any one character). Be careful to escape both of these glob characters when passing them as arguments to a yum command. If you do not, the bash shell will interpret the glob expressions as pathname expansions, and potentially pass all files in the current directory that match the globs to yum, which is not what you want. Instead, you want to pass the glob expressions themselves to yum, which you can do by either:
  • escaping the wildcard characters
  • double-quoting or single-quoting the entire glob expression.
The following examples show both methods:
~]# yum list available gimp\*plugin\*
Loaded plugins: presto, refresh-packagekit, security
Available Packages
gimp-fourier-plugin.x86_64       0.3.2-3.fc11        fedora
gimp-lqr-plugin.x86_64           0.6.1-2.fc11        updates

Example 1.2. Filtering results using a single glob expression with two escaped wildcard characters

~]# yum list installed "krb?-*"
Loaded plugins: presto, refresh-packagekit, security
Installed Packages
krb5-auth-dialog.x86_64         0.12-2.fc12         @fedora
krb5-libs.x86_64                1.7-8.fc12          @fedora
krb5-workstation.x86_64         1.7-8.fc12          @fedora

Example 1.3. Filtering results using a double-quoted glob expression

  • yum list <glob_expr> [more_glob_exprs ] — List information on installed and available packages matching all glob expressions.
    ~]# yum list abrt-addon\* abrt-plugin\*
    Loaded plugins: presto, refresh-packagekit, security
    Installed Packages
    abrt-addon-ccpp.x86_64                          0.0.9-2.fc12            @fedora
    abrt-addon-kerneloops.x86_64                    0.0.9-2.fc12            @fedora
    abrt-addon-python.x86_64                        0.0.9-2.fc12            @fedora
    abrt-plugin-bugzilla.x86_64                     0.0.9-2.fc12            @fedora
    abrt-plugin-kerneloopsreporter.x86_64           0.0.9-2.fc12            @fedora
    abrt-plugin-sqlite3.x86_64                      0.0.9-2.fc12            @fedora
    Available Packages
    abrt-plugin-filetransfer.x86_64                 0.0.9-2.fc12            fedora
    abrt-plugin-logger.x86_64                       0.0.9-2.fc12            fedora
    abrt-plugin-mailx.x86_64                        0.0.9-2.fc12            fedora
    abrt-plugin-runapp.x86_64                       0.0.9-2.fc12            fedora
    abrt-plugin-sosreport.x86_64                    0.0.9-2.fc12            fedora
    abrt-plugin-ticketuploader.x86_64               0.0.9-2.fc12            fedora
    
    Example 1.4. Listing all ABRT addons and plugins using glob expressions

  • yum list all — List all installed and available packages.
  • yum list installed — List all packages installed on your system. The rightmost column in the output lists the repository from which the package was retrieved.
  • yum list available — List all available packages in all enabled repositories.
  • yum grouplist — List all package groups.
  • yum repolist — List the repository ID, name, and number of packages it provides for each enabled repository.

Displaying Package Info

yum info <package_name> [more_names ] displays information about one or more packages (glob expressions are valid here as well):
~]# yum info abrt
Loaded plugins: presto, refresh-packagekit, security
Installed Packages
Name       : abrt
Arch       : x86_64
Version    : 0.0.9
Release    : 2.fc12
Size       : 525 k
Repo       : installed
From repo  : fedora
Summary    : Automatic bug detection and reporting tool
URL        : https://fedorahosted.org/abrt/
License    : GPLv2+
Description: abrt is a tool to help users to detect defects in applications and
           : to create bug reports that include all information required by the
           : maintainer to hopefully resolve it. It uses a plugin system to extend
           : its functionality.

yum info <package_name> is similar to the rpm -q --info <package_name> command, but provides as additional information the ID of the Yum repository the RPM package is found in (look for the From repo: line in the output).
yumdb info <package_name> [more_names ] can be used to query the Yum database for alternative and useful information about a package, including the checksum of the package (and algorithm used to produce it, such as SHA-256), the command given on the command line that was invoked to install the package (if any), and the reason that the package is installed on the system (where user indicates it was installed by the user, and dep means it was brought in as a dependency):
~]# yumdb info yum
yum-3.2.27-3.fc12.noarch
     checksum_data = 8d7773ec28c954c69c053ea4bf61dec9fdea11a59c50a2c31d1aa2e24bc611d9
     checksum_type = sha256
     command_line = update
     from_repo = updates
     from_repo_revision = 1272392716
     from_repo_timestamp = 1272414297
     reason = user
     releasever = 12
See man yumdb for more information on the yumdb command.
Finally, the yum history command, which is new in Fedora 13, can be used to show a timeline of Yum transactions, the dates and times on when they occurred, the number of packages affected, whether transactions succeeded or were aborted, and if the RPM database was changed between transactions. Refer to the history section of man yum for details.