Linux+: Applications 06 – Yum Queries


Jarret W. Buse

Linux+: Applications 06 – Yum Queries

To install, remove and upgrade packages you need to be able to find the package name. To find package names you use queries to check the repository, both local and remote.

The various Query subcommands are:

  • deplist
  • info
  • list
  • provides
  • search
  • updateinfo
  • check-update

There are also Query subcommands which are used to query groups:

  • grouplist
  • groupinfo

When you have a package and you need to know the dependencies for it, you use the “deplist” subcommand. The dependency list (deplist) subcommand syntax is:

yum deplist [package_name]

For instance, if I wished to install “gparted”, I could get a list of dependencies by typing “yum deplist gparted”. Keep in mind that some packages will have a smaller list than others.

In the case of “gparted”, the name gparted could be used or the actual package name such as “gparted.x86_64”.

Various information can be gained from the “info” subcommand. The information obtained about a package is as follows:

  • Already installed
  • Name
  • Architecture
  • Epoch
  • Version
  • Release
  • Size
  • Repo
  • Summary
  • URL
  • License Type
  • Description

The syntax for the “info” subcommand is:

yum info [package_name]

If I were to type in the command “yum info gimp”, I could get the following information:

Loaded plugins: langpacks, refresh-packagekit
Available Packages
Name : gimp
Arch : x86_64
Epoch : 2
Version : 2.8.14
Release : 1.fc20
Size : 14 M
Repo : updates/20/x86_64
Summary : GNU Image Manipulation Program
License : GPLv3+ and GPLv3
Description : GIMP (GNU Image Manipulation Program) is a powerful image : composition and editing program, which can be extremely useful : for creating logos and other graphics for webpages. GIMP has : many of the tools and filters you would expect to find in similar : commercial offerings, and some interesting extras as well.
: GIMP provides a large image manipulation toolbox, including : channel operations and layers, effects, sub-pixel imaging and : anti-aliasing, and conversions, all with multi-level undo.

Since the package information shows that the package is “Available”, it means that the package is not installed. If the package is installed, the line would show “Installed Packages”.

Not all information will be displayed for every package.
The “list” subcommand is used to list both installed and available packages. The syntax is:

yum list [package_name]

NOTE: As with other subcommands, the asterisk (*) can be used to denote multiple characters of varying types. For example, a package name of “xorg*” will denote all packages starting with “xorg”. The asterisk represents any other characters after the name “xorg”.

The command “yum list xorg*” will list all installed and available packages starting with “xorg”. The output listed has varying colors which are dependent on your distro. Check your man pages for the listing of your distro, but the colors usually are:

  • Red – package is installed with no available package
  • Yellow – package is installed with a newer version than that available
  • Blue – package installed is an upgrade to that available
  • Cyan – package available is a downgrade to the one installed
  • White – package installed is older than the available package
  • White underlined – kernel packages installed is same version as running kernel

It is possible to list all the installed and available packages by using the command:

yum list all

If you only want to see the installed packages, use the following:

yum list installed

For a listing of available packages, use:

yum list available

NOTE: Using “installed” or “available”, it is possible to still enter the package_name. Multiple names can be entered by separating them with a space.

To get a listing of which package provides a specific file, use the “provides” subcommand. The command syntax is:

yum provides [file_name]

If I wanted to know what package the file “” came from, I would type “yum provides”, something similar to the following would be displayed:

Loaded plugins: langpacks, refresh-packagekit
libstdc++-4.8.2-1.fc20.i686 : GNU Standard C++ Library
Repo : fedora
Matched from:
Provides :

libstdc++-4.8.3-7.fc20.i686 : GNU Standard C++ Library
Repo : updates
Matched from:
Provides :

Two packages were found “libstdc++-4.8.2-1.fc20.i686” and “libstdc++-4.8.3-7.fc20.i686”. This command can be helpful if a file is missing or corrupted and needs to be found to be reinstalled.

To search for installed and available packages, use the “search” subcommand. The “seach” subcommand differs from the “list” subcommand in that the package name is not required. The “search” subcommand searches for text in the name, description, summary and the listed package maintainer. The syntax is:

yum search [search_text]

For instance, if you were looking for a text editor, you could type “yum search text editor”. The results should be a listing of text editors and any type of affiliated program, such as add-ons.

The “updateinfo” subcommand is used to update your system's security packages. To begin with the security updates, you need the security plugin installed. To install the plugin, use the following command:

yum install yum-plugin-security

Once the plugin is installed, you can find what security patches are available for your system by entering:

yum updateinfo list

Packages should be listed, if there are any available, which shows if the package is a security patch and its severity. There are three severity levels: Important/Sec., Moderate/Sec. and Low/Sec. The package can also be listed as a “bugfix” or an “enhancement”.

Specific packages can be listed alone by adding the parameter “--sec-severity=type”. The type can be “Important”, “Moderate”, “Low”, “bugfix” or “enhancement”.

To update your system with all security patches, use the command:

yum --security update

NOTE: Any updates or installs require you to have root privileges.

The “check-update” subcommand can be used to check for updates on all installed packages. The syntax is:

yum check-update

The “check-update” can also be applied to security updates as well by using the following:

yum --security check-updates

Group packages are those which fall under a category. To see the list of categories, you use the subcommand “grouplist” in the following syntax:

yum grouplist

The groups can be similar to the following:

  • Available environment groups:
    • GNOME Desktop
    • KDE Plasma Workspaces
    • Xfce Desktop
    • LXDE Desktop
    • Cinnamon Desktop
    • MATE Desktop
    • Sugar Desktop Environment
    • Development and Creative Workstation
    • Web Server
    • Infrastructure Server
    • Basic Desktop
    • Minimal Install
  • Available Groups:
    • 3D Printing
    • Administration Tools
    • Audio Production
    • Authoring and Publishing
    • Books and Guides
    • C Development Tools and Libraries
    • Cloud Infrastructure
    • D Development Tools and Libraries
    • Design Suite
    • Development Tools
    • Editors
    • Educational Software
    • Electronic Lab
    • Engineering and Scientific
    • Fedora Eclipse
    • FreeIPA Server
    • Games and Entertainment
    • LibreOffice
    • Medical Applications
    • Milkymist
    • Network Servers
    • Office/Productivity
    • RPM Development Tools
    • Robotics
    • Security Lab
    • Sound and Video
    • System Tools
    • Text-based Internet
    • Window Managers

Once you see a group which you would like to install, you can install it with the command “yum groupinstall [group_name]”. The group name needs to be enclosed in double quote marks, especially if it contains a space.
The “groupinstall” subcommand will install all components of the group. If you want to get a list of the individual components, you use the subcommand “groupinfo” with the syntax:

yum groupinfo [group_name]

For instance, to see the components of the “Robotics” group, use the command “yum groupinfo Robotics”. The individual components will be shown and you can install a single component with the “yum install [component_name]” command.

As with other Linux+ articles, I suggest you install a Red Hat based OS such as Fedora and try these commands to become familiar with them.


  • slide.jpg
    32.9 KB · Views: 183,502

great article on the usage of Yum on our servers / VMS. How would one go about getting a listing of packages from archived repositories that're not defined or enabled on your server / VM?