yum(8) | yum(8) |
yum - Yellowdog Updater Modified
yum [options] [command] [package ...]
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:
* install package1 [package2] [...]
* update [package1] [package2] [...]
* update-to [package1] [package2] [...]
* check-update
* upgrade [package1] [package2] [...]
* upgrade-to [package1] [package2] [...]
* distribution-synchronization [package1] [package2] [...]
* remove | erase package1 [package2] [...]
* list [...]
* info [...]
* provides | whatprovides feature1 [feature2] [...]
* clean [ packages | metadata | expire-cache | rpmdb | plugins | all ]
* makecache
* groups [...]
* search string1 [string2] [...]
* shell [filename]
* resolvedep dep1 [dep2] [...]
* localinstall rpmfile1 [rpmfile2] [...]
(maintained for legacy reasons only - use install)
* localupdate rpmfile1 [rpmfile2] [...]
(maintained for legacy reasons only - use update)
* reinstall package1 [package2] [...]
* downgrade package1 [package2] [...]
* deplist package1 [package2] [...]
* repolist [all|enabled|disabled]
* version [ all | installed | available | group-* | nogroups* | grouplist
| groupinfo ]
* history
[info|list|packages-list|summary|addon-info|redo|undo|rollback|new]
* check
* help [command]
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 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 noticable 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.
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).
The group_package_types configuration option specifies which types will
be installed.
"group update" is just an alias for groupinstall, which will do the right thing because "yum install X" and "yum update X" do the same thing, when X is already installed.
"group list" is used to list the available groups from all yum repos. Groups are marked 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. The optional "hidden" argument will also list groups marked as not being "user visible". If you pass the -v option, to enable verbose mode, then the groupids are displayed.
"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 (Ie. 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.
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. 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).
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 packages-list command takes a package (with wildcards, as in Specifying package names).
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 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 upto 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 pacakge 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).
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).
> - 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.
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.
Eg. "history info 1..4" will merge the first four transactions
and display them as a single transaction.
Most command line options can be set using the configuration file as well and the descriptions indicate the necessary configuration option to set.
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.
The format of the output of yum list is:
name.arch [epoch:]version-release repo or @installed-from-repo
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:
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.
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:
1. The plugin module file must be installed in the plugin path as just described.
2. The global plugins option in /etc/yum/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.
/etc/yum/yum.conf /etc/yum/version-groups.conf /etc/yum/repos.d/ /etc/yum/pluginconf.d/ /var/cache/yum/
pkcon (1) yum.conf (5) yum-updatesd (8) package-cleanup (1) repoquery (1) yum-complete-transaction (1) yumdownloader (1) yum-utils (1) yum-security (8) http://yum.baseurl.org/ http://yum.baseurl.org/wiki/Faq yum search yum
See the Authors file included with this program.
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@lists.baseurl.org or filed in bugzilla.
Seth Vidal |