yum (8) - Linux Manuals
yum: Yellowdog Updater Modified
NAME
yum - Yellowdog Updater ModifiedSYNOPSIS
yum [options] [command] [package ...]DESCRIPTION
yum is an interactive, rpm based, package manager. It can automatically perform system updates, including dependency analysis and obsolete processing based on "repository" metadata. It can also perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands/services (see below). yum is similar to other high level package managers like apt-get and smart.
While there are some graphical interfaces directly to the yum code, more recent graphical interface development is happening with PackageKit and the gnome-packagekit application.
command is one of:
Unless the --help or -h option is given, one of the above commands
must be present.
Repository configuration is honored in all operations.
If the name starts with a "-" character, then a search is done within the
transaction and any matches are removed. Note that Yum options use the same
syntax and it may be necessary to use "--" to resolve any possible conflicts.
If the name is a file, then install works
like localinstall. If the name doesn't match a package, then package
"provides" are searched (e.g. "_sqlitecache.so()(64bit)") as are
filelists (Eg. "/usr/bin/yum"). Also note that for filelists, wildcards will
match multiple packages.
Because install does a lot of work to make it as easy as possible to use, there
are also a few specific install commands "install-n", "install-na"
and "install-nevra". These only work on package names, and do not process
wildcards etc.
If the main obsoletes configure option is true (default) or the --obsoletes
flag is present yum will include package
obsoletes in its calculations - this makes it better for distro-version
changes, for example: upgrading from somelinux 8.0 to somelinux 9.
Note that "update" works on installed packages first, and only if there
are no matches does it look for available packages. The difference is most
noticeable when you do "update foo-1-2" which will act exactly as
"update foo" if foo-1-2 is installed. You can use the "update-to"
if you'd prefer that nothing happen in the above case.
If you give the optional argument "full", then the command will also reinstall
packages where the install checksum and the available checksum do not match. And
remove old packages (can be used to sync. rpmdb versions). The optional argument
"different" can be used to specify the default operation.
This command does not perform operations on groups, local packages or negative
selections.
Note that "yum" is included in the protected_packages configuration, by default.
So you can't accidentally remove yum itself.
The remove_leaf_only configuration changes the behaviour of this command
to only remove packages which aren't required by something else.
The clean_requirements_on_remove configuration changes the behaviour of this
command to also remove packages that are only dependencies of this package.
Because remove does a lot of work to make it as easy as possible to use, there
are also a few specific remove commands "remove-n", "remove-na"
and "remove-nevra". These only work on package names, and do not process
wildcards etc.
Because autoremove does a lot of work to make it as easy as possible to use,
there are also a few specific autoremove commands "autoremove-n",
"autoremove-na" and "autoremove-nevra". These only work on package
names, and do not process wildcards etc.
Yum search orders the results so that those packages matching more terms will
appear first.
You can force searching everything by specifying "all" as the first argument.
"group install" is used to install all of the individual packages in a
group, of the specified types (this works as if you'd taken each of those
package names and put them on the command line for a "yum install" command).
"group update" is just an alias for group install, when using
group_command=compat. This will install packages in the group not already
installed and upgrade existing packages. With group_command=simple it will just
upgrade already installed packages. With group_command=objects it will try to
upgrade the group object, installing any available packages not blacklisted
(marked '-' in group info) and will upgrade the installed packages.
"group list" is used to list the available groups from all yum
repos. When group_command=objects the group is installed if the user
explicitly installed it (or used the group mark* commands to mark it installed).
It does not need to have any packages installed.
When not using group_command=objects groups are shown as "installed" if all
mandatory packages are installed, or if a group doesn't
have any mandatory packages then it is installed if any of the optional or
default package are installed (when not in group_command=objects mode).
You can pass optional arguments to the list/summary commands: installed,
available, environment, language, packages, hidden and ids (or any of those
prefixed by "no" to turn them off again).
Note that groups that are available but hidden will not be listed unless
'hidden' keyword is passed to the command.
If you pass the -v option, to enable verbose mode, then the groupids are
displayed by default (but "yum group list ids" is often easier to read).
"group remove" is used to remove all of the packages in a group, unlike "groupinstall" this
will remove everything regardless of group_package_types. It is worth pointing
out that packages can be in more than one group, so "group install X Y" followed
by "group remove Y" does not do give you the same result as "group install X".
The groupremove_leaf_only configuration changes the behaviour of this command
to only remove packages which aren't required by something else.
"group info" is used to give the description and package list of a group (and which type
those packages are marked as). Note that you can use the yum-filter-data and
yum-list-data plugins to get/use the data the other way around (i.e. what
groups own packages need updating). If you pass the -v option, to enable verbose
mode, then the package names are matched against installed/available packages
similar to the list command.
When using group_command=objects, the info command will display markers next
to each package saying how that package relates to the group object. The
meaning of these markers is:
you can move an installed package into an installed group using either
"group mark package-sync/package-sync-forced" or "yumdb set group_member".
"group summary" is used to give a quick summary of how many groups
are installed and available.
"group mark" and "group unmark" are used when groups are configured
in group_command=objects mode. These commands then allow you to alter yum's idea
of which groups are installed, and the packages that belong to them.
"group mark install" mark the group as installed. When
installed "yum upgrade" and "yum group upgrade" will install new
packages for the group (only those packages already installed will be marked as
members of the installed group to start with).
"group mark remove" the opposite of mark install.
"group mark packages" takes a group id (which must be installed) and marks
any given installed packages (which aren't members of a group) as members of
the group. Note that the data from the repositories does not need to specify
the packages as a member of the group.
"group mark packages-force" works like mark packages, but doesn't care if
the packages are already members of another group.
"group mark blacklist" will blacklist all packages marked to be installed
for a group. After this command a "yum group upgrade" will not install any new
packages as part of the group.
"group mark convert-blacklist"
"group mark convert-whitelist"
"group mark convert" converts the automatic data you get
without using groups as objects into groups as objects data, in other words
this will make "yum --setopt=group_command=objects groups list" look as similar
as possible to the current output of
"yum --setopt=group_command=simple groups list". This makes it much
easier to convert to groups as objects without having to reinstall. For groups
that are installed the whitelist variant will mark all uninstalled packages for
the group as to be installed on the next "yum group upgrade", the blacklist
variant (current default) will mark them all as blacklisted.
"group unmark packages" remove a package as a member from any groups.
Examples:
You can pass repo id or name arguments, or wildcards which to match against
both of those. However if the id or name matches exactly then the repo will
be listed even if you are listing enabled repos. and it is disabled.
In non-verbose mode the first column will start with a '*' if the repo. has
metalink data and the latest metadata is not local and will start with a
'!' if the repo. has metadata that is expired. For non-verbose mode the
last column will also display the number of packages in the repo. and (if there
are any user specified excludes) the number of packages excluded.
One last special feature of repolist, is that if you are in non-verbose mode
then yum will ignore any repo errors and output the information it can get
(Eg. "yum clean all; yum -C repolist" will output something, although the
package counts/etc. will be zeroed out).
"repository-packages <repo> list" - Works like the "yum list" command, but
only shows packages from the given repository.
"repository-packages <repo> info" - Works like the "yum info" command, but
only shows packages from the given repository.
"repository-packages <repo> check-update" - Works like the
"yum check-update" command, but only shows packages from the given repository.
"repository-packages <repo> install" - Install all of the packages in the
repository, basically the same as: yum install $(repoquery --repoid=<repo> -a).
Specific packages/wildcards can be specified.
"repository-packages <repo> upgrade" - Update all of the packages in the
repository, basically the same as: yum upgrade $(repoquery --repoid=<repo> -a).
Specific packages/wildcards can be specified.
"repository-packages <repo> upgrade-to" - Update all of the packages in the
repository, basically the same as: yum upgrade $(repoquery --repoid=<repo> -a).
Without arguments it works the same as upgrade, with arguments it just
interprets them as the versions you want to move to.
"repository-packages <repo> reinstall-old" - ReInstall all of the packages
that are installed from the repository and available in the
repository, similar to: yum reinstall $(yumdb search-quiet from_repo <repo>).
"repository-packages <repo> move-to" - ReInstall all of the packages
that are available in the repository, basically the same as:
yum reinstall $(repoquery --repoid=<repo> -a).
"repository-packages <repo> reinstall" - Tries to do reinstall-old, but if that
produces no packages then tries move-to.
"repo-pkgs <repo> remove" - Remove all of the packages in the repository, very
similar to: yum remove $(repoquery --repoid=<repo> -a). However the
repopkgsremove_leaf_only option is obeyed.
"repo-pkgs <repo> remove-or-reinstall" - Works like remove for any package
that doesn't have the exact same version in another repository. For any package
that does have the exact NEVRA in another repository then that version will be
reinstalled.
"repo-pkgs <repo> remove-or-distro-sync" - Works like remove for any package
that doesn't exist in another repository. For any package that does exist
it tries to work as if distro-sync was called (with the repo. disabled).
The version command will now show "groups" of packages as a separate version,
and so takes sub-commands:
"version grouplist" - List the defined version groups.
"version groupinfo" - Get the complete list of packages within one or more version groups.
"version installed" - This is the default, only show the version information for installed packages.
"version available" - Only show the version information for available packages.
"version all" - Show the version information for installed and available packages.
"version nogroups | nogroups-*" - Just show the main version information.
"version group-*" - Just show the grouped version information, if more arguments are given then only show the data for those groups.
The info/list/summary commands take either a transaction id or a package (with
wildcards, as in Specifying package names), all three can also be passed
no arguments. list can be passed the keyword "all" to list all the transactions.
The info command can also take ranges of transaction ids, of the form start..end,
which will then display a merged history as if all the transactions in the range
had happened at once.
The packages-list/packages-info commands takes a package (with wildcards, as in
Specifying package names). And show data from the point of view of that
package.
The undo/redo/rollback commands take either a single transaction id or the
keyword last and an offset from the last transaction (Eg. if you've done 250
transactions, "last" refers to transaction 250, and "last-4" refers to
transaction 246).
The redo command can also take some optional arguments before you specify the
transaction. "force-reinstall" tells it reinstall any packages that were
installed in that transaction (via install, upgrade or downgrade).
"force-remove" tells it to forcibly remove any packages that were updated or
downgraded.
The undo/redo commands act on the specified transaction, undo'ing or repeating
the work of that transaction. While the rollback command will undo all
transactions up to the point of the specified transaction. For example, if you
have 3 transactions, where package A; B and C where installed respectively.
Then "undo 1" will try to remove package A, "redo 1" will try to install package
A (if it is not still installed), and "rollback 1" will try to remove packages
B and C. Note that after a "rollback 1" you will have a fourth transaction,
although the ending rpmdb version (see: yum version) should be the same in
transactions 1 and 4.
The addon-info command takes a transaction ID, and the packages-list command
takes a package (with wildcards).
The stats command shows some statistics about the current history DB.
The sync commands allows you to change the rpmdb/yumdb data stored for any
installed packages, to whatever is in the current rpmdb/yumdb (this is mostly
useful when this data was not stored when the package went into the history DB).
In "history list" you can change the behaviour of the 2nd column via the
configuration option history_list_view.
In "history list" output the Altered column also gives some extra information
if there was something not good with the transaction (this is also shown at the
end of the package column in the packages-list command).
Running the command without an argument, or a directory as an argument will
try and list the possible files available to load. Showing if the packages are
still available, if the rpmdb matches the current rpmdb, how many transaction
install/removes members are in the saved transaction and what the filename is.
which all display information about the available update information relevant
to your machine (including anything installed, if you supply "all").
There are also three sub-commands to remove packages when using "yum shell",
they are:
they all take the following arguments:
and finally there is a command to manually check the running kernel against
updateinfo data:
then you can create and delete snapshots using:
the first 3 being a simple interface to change yum.conf altering the tsflags
and override_install_langs configurations. The refilter command is an optimized
way of calling "yum reinstall" to reinstall the packages with the new filters
applied. The refilter-cleanup command is needed because rpm doesn't actually
remove the files on reinstall, as it should. And the du/status/diff commands are
included so you can easily see the space used/saved and any other changes.
Can be disabled using --disableexcludes.
Configuration Option: exclude, includepkgs
The format of the output of yum list is:
name.arch [epoch:]version-release repo or @installed-from-repo
Note that if the repo cannot be determined, "installed" is printed instead.
To list all updates that are security relevant, and get a return code on whether there are security updates use:
To upgrade packages that have security errata (upgrades to the latest
available package) use:
To upgrade packages that have security errata (upgrades to the last
security errata package) use:
To get a list of all BZs that are fixed for packages you have installed use:
To get a list of all security advisories, including the ones you have already
installed use:
To get the information on advisory FEDORA-2707-4567 use:
For Red Hat advisories, respin suffixes are also accepted in the ID, although
they won't have any effect on the actual respin selected by yum, as it will
always select the latest one available. For example, if you use:
while RHSA-2016:1234-3 has been shipped already, yum will select the latter
(provided your updateinfo.xml is current). The same would happen if you just
specified RHSA-2016:1234. That said, there's no need for you to specify or
care about the suffix at all.
To update packages to the latest version which contain fixes for Bugzillas 123, 456 and 789; and all security updates use:
To update to the packages which just update Bugzillas 123, 456 and 789; and all security updates use:
To get an info list of the latest packages which contain fixes for Bugzilla 123; CVEs CVE-2207-0123 and CVE-2207-3210; and Fedora advisories FEDORA-2707-4567 and FEDORA-2707-7654 use:
To get a list of packages which are "new".
To get a summary of advisories you haven't installed yet use:
1. The plugin module file must be installed in the plugin path as just
described.
2. The global plugins option in /etc/yum.conf must be set to `1'.
3. A configuration file for the plugin must exist in
/etc/yum/pluginconf.d/<plugin_name>.conf and the enabled setting in this
file must set to `1'. The minimal content for such a configuration file is:
See the yum.conf(5) man page for more information on plugin related
configuration options.
* install package1 [package2] [...]
* update [package1] [package2] [...]
* update-to [package1] [package2] [...]
* update-minimal [package1] [package2] [...]
* check-update
* upgrade [package1] [package2] [...]
* upgrade-to [package1] [package2] [...]
* distribution-synchronization [package1] [package2] [...]
* remove | erase package1 [package2] [...]
* autoremove [package1] [...]
* list [...]
* info [...]
* provides | whatprovides feature1 [feature2] [...]
* clean [ packages | metadata | expire-cache | rpmdb | plugins | all ]
* makecache [fast]
* groups [...]
* search string1 [string2] [...]
* shell [filename]
* resolvedep dep1 [dep2] [...]
* localinstall rpmfile1 [rpmfile2] [...]
* localupdate rpmfile1 [rpmfile2] [...]
* reinstall package1 [package2] [...]
* downgrade package1 [package2] [...]
* deplist package1 [package2] [...]
* repolist [all|enabled|disabled]
* repoinfo [all|enabled|disabled]
* repository-packages <enabled-repoid> <install|remove|remove-or-reinstall|remove-or-distribution-synchronization> [package2] [...]
* version [ all | installed | available | group-* | nogroups* | grouplist | groupinfo ]
* history [info|list|packages-list|packages-info|summary|addon-info|redo|undo|rollback|new|sync|stats]
* load-transaction [txfile]
* updateinfo [summary | list | info | remove-pkgs-ts | exclude-updates | exclude-all | check-running-kernel]
* fssnapshot [summary | list | have-space | create | delete]
* fs [filters | refilter | refilter-cleanup | du]
* check
* help [command]
"-" = Package isn't installed, and won't be installed as part of the group (Eg. "yum group install foo -pkgA" or "yum group install foo; yum remove pkgA" … this will have pkgA marked as '-')
"+" = Package isn't installed, but will be the next time you run "yum upgrade" or "yum group upgrade foo"
" " = Package is installed, but wasn't installed via the group (so "group remove foo" won't remove it).
"=" = Package is installed, and was installed via the group.
swap foo bar
swap -- remove foo -- install bar
swap foo group install bar-grp
swap -- group remove foo-grp -- group install bar-grp
Eg. "history info 1..4" will merge the first four transactions and display them
as a single transaction.
> - The rpmdb was changed, outside yum, after the transaction.
< - The rpmdb was changed, outside yum, before the transaction.
* - The transaction aborted before completion.
# - The transaction completed, but with a non-zero status.
E - The transaction completed fine, but had warning/error output during the transaction.
P - The transaction completed fine, but problems already existed in the rpmdb.
s - The transaction completed fine, but --skip-broken was enabled and had to skip some packages.
yum updateinfo info [all | available | installed | updates]
yum updateinfo list [all | available | installed | updates]
yum updateinfo [summary] [all | available | installed | updates]
* updates
Is used to display information about advisories for packages that can be
updated. This is the default.
* installed
Is used to display information only about installed advisories.
* available
Is used to display information about advisories for packages available
for updating or installation.
* all
Is used to display information about both installed and available advisories.
They all take as arguments:
* <advisory> [advisory...]
Is used to display information about one or more advisories.
* <package> [package...]
Is used to display information about one or more packages.
* bugzillas / bzs
Is the subset of the updateinfo information, pertaining to the bugzillas.
* cves
Is the subset of the updateinfo information, pertaining to the CVEs.
* enhancement
Is the subset of the updateinfo information, pertaining to enhancements.
* bugfix
Is the subset of the updateinfo information, pertaining to bugfixes.
* security / sec
Is the subset of the updateinfo information, pertaining to security.
* severity / sev
Include security relevant packages of this severity.
* recommended
Is the subset of the updateinfo information, pertaining to recommended updates.
* new-packages
Is the subset of the updateinfo information, pertaining to new packages. These
are packages which weren't available at the initial release of your
distribution.
yum updateinfo remove-pkgs-ts
yum updateinfo exclude-updates
yum updateinfo exclude-all
* [bzs=foo] [advisories=foo] [cves=foo] [security-severity=foo] [security] [bugfix]
yum updateinfo check-running-kernel
yum fssnapshot [summary]
yum fssnapshot list
yum fssnapshot have-space
yum fssnapshot create
yum fssnapshot delete <device(s)>
Configuration Options: fssnap_automatic_pre, fssnap_automatic_post, fssnap_automatic_keep, fssnap_percentage, fssnap_devices, fssnap_abort_on_errors
yum fs filters
yum fs filter languages en:es
yum fs filter documentation
yum fs refilter [package(s)]
yum fs refilter-cleanup [package(s)]
yum fs du [path]
yum fs status [path]
yum fs diff [path]
GENERAL OPTIONS
Most command line options can be set using the configuration file as
well and the descriptions indicate the necessary configuration option
to set.
Configuration Option: assumeyes
Configuration Option: assumeno
Configuration Option: debuglevel
Configuration Option: errorlevel
Configuration Option: rpmverbosity
Configuration Option: installroot
Configuration Option: enabled
Configuration Option: enabled
Configuration Option: obsoletes
all == disable all excludes
main == disable excludes defined in [main] in yum.conf
repoid == disable excludes defined for that repo
all == disable all includes
repoid == disable includes defined for that repo
Configuration Option: plugins
Configuration Option: gpgcheck
Configuration Option: skip_broken
LIST OPTIONS
The following are the ways which you can invoke yum in list
mode. Note that all list commands include information on the
version of the package.
SPECIFYING PACKAGE NAMES
A package can be referred to for install, update, remove, list, info etc
with any of the following as well as globs of any of the following:
name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch
CLEAN OPTIONS
The following are the ways which you can invoke yum in clean
mode. Note that "all files" in the commands below means
"all files in currently enabled repositories".
If you want to also clean any (temporarily) disabled repositories you need to
use --enablerepo='*' option.
EXAMPLES
PLUGINS
Yum can be extended through the use of plugins. A plugin is a Python ".py" file
which is installed in one of the directories specified by the pluginpath
option in yum.conf. For a plugin to work, the following conditions must be met:
enabled = 1
FILES
/etc/yum.conf
/etc/yum/version-groups.conf
/etc/yum.repos.d/
/etc/yum/pluginconf.d/
/var/cache/yum/
AUTHORS
See the Authors file included with this program.
BUGS
There of course aren't any bugs, but if you find any, you should first
consult the FAQ mentioned above and then email the mailing list:
yum [at] lists.baseurl.org or filed in bugzilla.
SEE ALSO
pkcon (1)
yum.conf (5)
yum-updatesd (8)
package-cleanup (1)
repoquery (1)
yum-complete-transaction (1)
yumdownloader (1)
yum-utils (1)
yum-langpacks (1)
http://yum.baseurl.org/
http://yum.baseurl.org/wiki/Faq
yum search yum