1. How To List YUM Packages
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To......................................................................................................................................................1
Yum Options..................................................................................................................................................1
Yum Package Listing......................................................................................................................................1
List Packages .............................................................................................................................................1
List Available Packages..............................................................................................................................2
List Installed Packages...............................................................................................................................2
List Extras Packages ..................................................................................................................................3
List Obsoletes............................................................................................................................................3
List Updates...............................................................................................................................................3
List Recent Package...................................................................................................................................4
List Package Pkgspec.................................................................................................................................4
List Update Packages ................................................................................................................................4
List Package Info .......................................................................................................................................5
List Package Search...................................................................................................................................6
List Package Provides................................................................................................................................7
2. How To List YUM Packages
1 | P a g e
Overview
The purpose of this guide is to know the usage of YUM (Yellowdog updater modified). It is an automatic
updater and package installer/remover for rpm system(s).
One of the main features, it automatically identifies dependencies and ensures as to what packages
needs to be installed to complete requested package installation.
You can also utilize yum to install a group of packages, one of such group is “Development Tools”.
Yum has a plugin interface for adding simple features. Yum can also be used python programs via its
module interface.
yum clean, is cache option will help in managing the disk space at regular intervals on the system.
Applies To
Linux flavor where yum is installed
Tested on CentOS 7, RHEL 7
Yum Options
Yum command has different options for performing different type of package administration, few of the
major commands are discussed here.
Yum Package Listing
yum list command lists package(s) in any repository enabled, packages installed, packages available for
installation for the system.
List Packages
Yum list’s packages as well as refine your list with a package specification of any of the package's name,
arch, version, release, epoch. This option will list both installed and available packages.
yum list or yum list all
3. How To List YUM Packages
2 | P a g e
List Available Packages
Lists all the packages available for installation from in any of enabled repository on system.
yum list available
List Installed Packages
This command is equivalent to “rpm -qa”. It lists all the packages installed on the system.
yum list installed
4. How To List YUM Packages
3 | P a g e
List Extras Packages
This command lists any installed package which no longer appears in any of your enabled repositories.
Useful for finding packages which linger between upgrades or things installed not from a repo.
yum list extras
List Obsoletes
List the packages installed on the system that are obsoleted by packages in any yum repository listed in
the config file.
yum list obsoletes
List Updates
This command lists any package in an enabled repository if a update is available for installed package(s)
on the server.
yum list updates
5. How To List YUM Packages
4 | P a g e
List Recent Package
List packages recently added packages into the repositories.
yum list recent
List Package Pkgspec
This command allows you to refine your listing for particular packages.
yum list pkgspec java-1.6.0-openjdk.x86_64
List Update Packages
It’s exactly like yum list updates but returns an exit code of 100 if there are updates available. Handy for
shell scripting. Running in verbose mode will list obsolete packages also.
yum check-update
6. How To List YUM Packages
5 | P a g e
List Package Info
This displays more information about any package installed or available. It takes the same arguments
as yum list but it is best run with a specific package name.
yum info NetworkManager
7. How To List YUM Packages
6 | P a g e
List Package Search
This allows you to search for information from the various metadata available about packages. It can
accept multiple arguments. It will output the packages which match the most terms first followed by the
next highest number of matches, etc. Specifically yum search looks at the following fields: name,
summary, description, URL.
To find for what package provides a certain command try yum provides instead.
yum search postfix -q or
yum search postfix -all -q ; To search all the packages list containing postfix.
8. How To List YUM Packages
7 | P a g e
List Package Provides
yum provides or yum whatprovides is used to find out which package provides some feature or file. Just
use a specific name or a file-glob-syntax wildcards to list the packages available or installed that provide
that feature or file.
Command Purpose
yum provides */main.cf -q To list package name containing the file in a package
yum whatprovides /etc/httpd/ -q To list package name containing the folder hierarchy
yum provides /etc/httpd/conf/httpd.conf -q To list package name containing the queried path and
file in the directory