Product SiteDocumentation Site

Chapter 5. Yum Command Usage

5.1. Yum Commands and Syntax
5.2. Packages names
5.3. The Help Command
5.4. Repository Listing
5.5. Installing New Software
5.5.1. Install from the enabled repositories
5.5.2. Finger error, look at the suggestions
5.5.3. Installing an RPM
5.5.4. Reinstalling Software
5.6. Updating Software
5.6.1. Updating a Package
5.6.2. Updating with an RPM
5.6.3. Downgrade to a Previous Version
5.6.4. General Update
5.6.5. Checking and Update Listing
5.6.6. Exclude when Updating
5.6.7. Avoiding packages with problems when updating
5.7. Removing Software
5.8. Querying Package Information
5.9. Queries and Package Listings
5.9.1. Search by Name, Description and Summary
5.9.2. Search by file or functionality
5.9.3. Listing installed packages
5.9.4. Listing of available packages
5.9.5. Listing available updates
5.9.6. Listing recent packages
5.9.7. Listing foreign packages
5.10. Enable a repository on the go
5.11. Dependencies Listing
5.12. Query the cache
5.13. Show duplicates
5.14. Existing lock ...
5.15. YUM Software Groups
5.15.1. Listing available groups
5.15.2. Packages info from a group
5.15.3. Installing and Removing Groups
5.16. YUM history and logs
5.16.1. History
5.16.2. Undo? Redo!
5.16.3. Corrupt History
5.16.4. Responsible Identification with sudo
5.16.5. Checking the rpm database
After configuring the YUM system, you can use the yum command line (CLI). It will be demonstrated with examples using common useful parameters necessary in the daily operations of a Fedora system administrator.

5.1. Yum Commands and Syntax

If you check the man pages, man yum , you will find the following definition for the use of yum:
yum [options] [command] [package ...]
From the syntax we know that there are yum options and commands, followed by a list of package names. Different yum commands and options will be mixed throughout the development of this manual, but it is very important to emphasize their difference and that not all options apply to all commands. The main reference is the yum manual page yum ( man yum ). One quick option is simply typing the yum command and see the usage help it displays, for example, below is the output of yum according to the extensions installed on a given Fedora 13 system, listing the commands and options:
$ yum
Loaded plugins: aliases, filter-data, list-data, local, merge-conf, presto,
              : refresh-packagekit, tmprepo
You need to give some command
Usage: yum [options] COMMAND

List of Commands:

alias          Adds or lists aliases
check          Check for problems in the rpmdb
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
grouplist      List available package groups
groupremove    Remove the packages in a group from your system
help           Display a helpful usage message
history        Display, or use, the transaction history
info           Display details about a package or group of packages
info-arches    Display aggregate data on the arch attribute of a group of packages
And list all the packages under each
info-archive-sizes Display aggregate data on the archivesize attribute of a group of packages
And list all the packages under each
info-baseurls  Display aggregate data on the url attribute of a group of packages
And list all the packages under each
info-buildhosts Display aggregate data on the buildhost attribute of a group of packages
And list all the packages under each
info-committers Display aggregate data on the committer attribute of a group of packages
And list all the packages under each
info-groups    Display aggregate group data, for matching members
And list all the packages under each
info-installed-sizes Display aggregate data on the installedsize attribute of a group of packages
And list all the packages under each
info-licenses  Display aggregate data on the license attribute of a group of packages
And list all the packages under each
info-package-sizes Display aggregate data on the packagesize attribute of a group of packages
And list all the packages under each
info-packagers Display aggregate data on the packager attribute of a group of packages
And list all the packages under each
info-rpm-groups Display aggregate data on the group attribute of a group of packages
And list all the packages under each
info-vendors   Display aggregate data on the vendor attribute of a group of packages
And list all the packages under each
install        Install a package or packages on your system
list           List a package or groups of packages
list-arches    Display aggregate data on the arch attribute of a group of packages
list-archive-sizes Display aggregate data on the archivesize attribute of a group of packages
list-baseurls  Display aggregate data on the url attribute of a group of packages
list-buildhosts Display aggregate data on the buildhost attribute of a group of packages
list-committers Display aggregate data on the committer attribute of a group of packages
list-groups    Display aggregate group data, for matching members
list-installed-sizes Display aggregate data on the installedsize attribute of a group of packages
list-licenses  Display aggregate data on the license attribute of a group of packages
list-package-sizes Display aggregate data on the packagesize attribute of a group of packages
list-packagers Display aggregate data on the packager attribute of a group of packages
list-rpm-groups Display aggregate data on the group attribute of a group of packages
list-vendors   Display aggregate data on the vendor attribute of a group of packages
localinstall   Install a local RPM
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repolist       Display the configured software repositories
resolvedep     Determine which package provides the given dependency
search         Search package details for the given string
shell          Run an interactive yum shell
update         Update a package or packages on your system
upgrade        Update packages taking obsoletes into account
version        Display a version for the machine and/or available repos.


Options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C, --cacheonly       run entirely from system cache, don't update cache
  -c [config file], --config=[config file]
                        config file location
  -R [minutes], --randomwait=[minutes]
                        maximum command wait time
  -d [debug level], --debuglevel=[debug level]
                        debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e [error level], --errorlevel=[error level]
                        error output level
  --rpmverbosity=[debug level name]
                        debugging output level for rpm
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y, --assumeyes       answer yes for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --releasever=RELEASEVER
                        set value of $releasever in yum config and repo files
  --setopt=SETOPTS      set arbitrary config and repo options
  --filter-vendors=FILTER_VENDORS
                        Filter to packages with a matching vendor
  --filter-rpm-groups=FILTER_RPM_GROUPS
                        Filter to packages with a matching group
  --filter-packagers=FILTER_PACKAGERS
                        Filter to packages with a matching packager
  --filter-licenses=FILTER_LICENSES
                        Filter to packages with a matching license
  --filter-committers=FILTER_COMMITTERS
                        Filter to packages with a matching committer
  --filter-arches=FILTER_ARCHES
                        Filter to packages with a matching arch
  --filter-buildhosts=FILTER_BUILDHOSTS
                        Filter to packages with a matching buildhost
  --filter-urls=FILTER_URLS
                        Filter to packages with a matching url
  --filter-package-sizes=FILTER_PACKAGE_SIZES
                        Filter to packages with a packagesize in the given
                        range
  --filter-archive-sizes=FILTER_ARCHIVE_SIZES
                        Filter to packages with a archivesize in the given
                        range
  --filter-installed-sizes=FILTER_INSTALLED_SIZES
                        Filter to packages with a installedsize in the given
                        range
  --filter-groups=FILTER_GROUPS
                        Filter to packages within a matching yum group
  --merge-conf          Merge configuration changes after installation
  --disablepresto       disable Presto plugin and don't download any deltarpms

  Plugin Options:
    --tmprepo=[url]     enable one or more repositories from URLs
    --tmprepo-keep-created
                        keep created direcotry based tmp. repos.