other versions
- wheezy 3.2.25-2
- wheezy-backports 3.4.3-2~bpo7+1
- jessie 3.4.3-3
- testing 3.4.3-3
- unstable 3.4.3-3
yum(8) | yum(8) |
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:(maintained for legacy reasons only - use install)
(maintained for legacy reasons only - use update)
- install
- Is used to install the latest version of a package or group of packages while ensuring that all dependencies are satisfied. (See Specifying package names for more information) If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed. If the name starts with an @ character the rest of the name is used as though passed to the groupinstall command. If the name starts with a - character, then a search is done within the transaction and any matches are removed. If the name is a file, then install works like localinstall. If the name doesn't match a package, then package "provides" are searched (Eg. "_sqlitecache.so()(64bit)") as are filelists (Eg. "/usr/bin/yum"). Also note that for filelists, wildcards will match multiple packages.
- update
- If run without any packages, update will update every
currently installed package. If one or more packages or package globs are
specified, Yum will only update the listed packages. While updating
packages, yum will ensure that all dependencies are satisfied. (See
Specifying package names for more information) If the packages or
globs specified match to packages which are not currently installed then
update will not install them. update operates on groups, files, provides
and filelists just like the "install" command.
- update-to
- This command works like "update" but always specifies the version of the package we want to update to.
- check-update
- Implemented so you could know if your machine had any updates that needed to be applied without running it interactively. Returns exit value of 100 if there are packages available for an update. Also returns a list of the packages to be updated in list format. Returns 0 if no packages are available for update. Returns 1 if an error occurred. Running in verbose mode also shows obsoletes.
- upgrade
- Is the same as the update command with the --obsoletes flag set. See update for more details.
- upgrade-to
- This command works like "upgrade" but always specifies the version of the package we want to update to.
- distribution-synchronization or distro-sync
- Synchronizes the installed package set with the latest
packages available, this is done by either obsoleting, upgrading or
downgrading as appropriate. This will "normally" do the same
thing as the upgrade command however if you have the package FOO installed
at version 4, and the latest available is only version 3, then this
command will downgrade FOO to version 3.
- remove or erase
- Are used to remove the specified packages from the system
as well as removing any packages which depend on the package being
removed. remove operates on groups, files, provides and filelists just
like the "install" command.(See Specifying package names
for more information)
- list
- Is used to list various information about available packages; more complete details are available in the List Options section below.
- provides or 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.
- search
- This is used to find packages when you know something about
the package but aren't sure of it's name. By default search will try
searching just package names and summaries, but if that "fails"
it will then try descriptions and url.
- info
- Is used to list a description and summary information about available packages; takes the same arguments as in the List Options section below.
- clean
- Is used to clean up various things which accumulate in the yum cache directory over time. More complete details can be found in the Clean Options section below.
- makecache
- Is used to download and make usable all the metadata for the currently enabled yum repos.
- groups
- A command, new in 3.4.2, that collects all the subcommands
that act on groups together.
The group_package_types configuration option specifies which types will be installed.
- shell
- Is used to enter the 'yum shell', when a filename is specified the contents of that file is executed in yum shell mode. See yum-shell(8) for more info
- resolvedep
- Is used to list packages providing the specified dependencies, at most one package is listed per dependency.
- localinstall
- Is used to install a set of local rpm files. If required the enabled repositories will be used to resolve dependencies. Note that the install command will do a local install, if given a filename. This option is maintained for legacy reasons only.
- localupdate
- Is used to update the system by specifying local rpm files. Only the specified rpm files of which an older version is already installed will be installed, the remaining specified packages will be ignored. If required the enabled repositories will be used to resolve dependencies. Note that the update command will do a local update, if given a filename. This option is maintained for legacy reasons only.
- reinstall
- Will reinstall the identically versioned package as is currently installed. This does not work for "installonly" packages, like Kernels. reinstall operates on groups, files, provides and filelists just like the "install" command.
- downgrade
- Will try and downgrade a package from the version currently installed to the previously highest version (or the specified version). The depsolver will not necessarily work, but if you specify all the packages it should work (and thus. all the simple cases will work). Also this does not work for "installonly" packages, like Kernels. downgrade operates on groups, files, provides, filelists and rpm files just like the "install" command.
- deplist
- Produces a list of all dependencies and what packages provide those dependencies for the given packages. As of 3.2.30 it now just shows the latest version of each package that matches (this can be changed by using --showduplicates) and it only shows the newest providers (which can be changed by using --verbose).
- repolist
- Produces a list of configured repositories. The default is
to list all enabled repositories. If you pass -v, for verbose mode, more
information is listed. If the first argument is 'enabled', 'disabled' or
'all' then the command will list those types of repos.
- version
- Produces a "version" of the rpmdb, and of the
enabled repositories if "all" is given as the first argument.
You can also specify version groups in the version-groups config. file. If
you pass -v, for verbose mode, more information is listed. The version is
calculated by taking a sha1 hash of the packages (in sorted order), and
the checksum_type/checksum_data entries from the yumdb. Note that this
rpmdb version is now also used significantly within yum (esp. in yum
history).
- history
- The history command allows the user to view what has
happened in past transactions (assuming the history_record config. option
is set). You can use info/list/packages-list/summary to view what
happened, undo/redo/rollback to act on that information and new to start a
new history file.
- check
- Checks the local rpmdb and produces information on any
problems it finds. You can pass the check command the arguments
"dependencies" or "duplicates", to limit the checking
that is performed (the default is "all" which does both).
- help
- Produces help, either for all commands or if given a command name then the help for that particular command.
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.- -h, --help
- Help; display a help message and then quit.
- -y, --assumeyes
- Assume yes; assume that the answer to any question which
would be asked is yes.
- -c, --config=[config file]
- Specifies the config file location - can take HTTP and FTP
URLs and local file paths.
- -q, --quiet
- Run without output. Note that you likely also want to use
-y.
- -v, --verbose
- Run with a lot of debugging output.
- -d, --debuglevel=[number]
- Sets the debugging level to [number] - turns up or down the
amount of things that are printed. Practical range: 0 - 10
- -e, --errorlevel=[number]
- Sets the error level to [number] Practical range 0 - 10. 0
means print only critical errors about which you must be told. 1 means
print all errors, even ones that are not overly important. 1+ means print
more errors (if any) -e 0 is good for cron jobs.
- --rpmverbosity=[name]
- Sets the debug level to [name] for rpm scriplets. 'info' is
the default, other options are: 'critical', 'emergency', 'error', 'warn'
and 'debug'.
- -R, --randomwait=[time in minutes]
- Sets the maximum amount of time yum will wait before performing a command - it randomizes over the time.
- -C, --cacheonly
- Tells yum to run entirely from system cache - does not download or update any headers unless it has to to perform the requested action. If you're using this as a user yum will not use the tempcache for the user but will only use the system cache in the system cachedir.
- --version
- Reports the yum version number and installed package versions for everything in history_record_packages (can be added to by plugins).
- --showduplicates
- Doesn't limit packages to their latest versions in the info, list and search commands (will also affect plugins which use the doPackageLists() API).
- --installroot=root
- Specifies an alternative installroot, relative to which all
packages will be installed. Think of this like doing "chroot
<root> yum" except using --installroot allows yum to work
before the chroot is created. Note: You may also want to use the option
--releasever=/ when creating the installroot as otherwise the $releasever
value is taken from the rpmdb within the installroot (and thus. will be
empty, before creation).
- --enablerepo=repoidglob
- Enables specific repositories by id or glob that have been
disabled in the configuration file using the enabled=0 option.
- --disablerepo=repoidglob
- Disables specific repositories by id or glob.
- --obsoletes
- This option only has affect for an update, it enables
yum´s obsoletes processing logic. For more information see the
update command above.
- -x, --exclude=package
- Exclude a specific package by name or glob from updates on
all repositories. Configuration Option: exclude
- --color=[always|auto|never]
- Display colorized output automatically, depending on the
output terminal, always (using ANSI codes) or never. Note that some
commands (Eg. list and info) will do a little extra work when color is
enabled. Configuration Option: color
- --disableexcludes=[all|main|repoid]
- Disable the excludes defined in your config files. Takes
one of three options:
- --disableplugin=plugin
- Run with one or more plugins disabled, the argument is a
comma separated list of wildcards to match against plugin names.
- --noplugins
- Run with all plugins disabled.
- --nogpgcheck
- Run with GPG signature checking disabled.
- --skip-broken
- Resolve depsolve problems by removing packages that are
causing problems from the transaction.
- --releasever=version
- Pretend the current release version is the given string. This is very useful when combined with --installroot. You can also use --releasever=/ to take the releasever information from outside the installroot. Note that with the default upstream cachedir, of /var/cache/yum, using this option will corrupt your cache (and you can use $releasever in your cachedir configuration to stop this).
- -t, --tolerant
- This option currently does nothing.
- --setopt=option=value
- Set any config option in yum config or repo files. For options in the global config just use: --setopt=option=value for repo options use: --setopt=repoid.option=value
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.- OUTPUT
-
- yum list [all | glob_exp1] [glob_exp2] [...]
- List all available and installed packages.
- yum list available [glob_exp1] [...]
- List all packages in the yum repositories available to be installed.
- yum list updates [glob_exp1] [...]
- List all packages with updates available in the yum repositories.
- yum list installed [glob_exp1] [...]
- List the packages specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed.
- yum list extras [glob_exp1] [...]
- List the packages installed on the system that are not available in any yum repository listed in the config file.
- yum list obsoletes [glob_exp1] [...]
- List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file.
- yum list recent
- List packages recently added into the repositories. This is often not helpful, but what you may really want to use is "yum list-updateinfo new" from the security yum plugin.
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:- For example: yum remove kernel-2.4.1-10.i686
this will remove this specific kernel-ver-rel.arch.
- Or: yum list available 'foo*'
will list all available packages that match 'foo*'. (The single quotes will keep your shell from expanding the globs.)
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.- yum clean expire-cache
- Eliminate the local data saying when the metadata and
mirrorlists were downloaded for each repo. This means yum will revalidate
the cache for each repo. next time it is used. However if the cache is
still valid, nothing significant was deleted.
- yum clean packages
- Eliminate any cached packages from the system. Note that
packages are not automatically deleted after they are downloaded.
- yum clean headers
- Eliminate all of the header files, which old versions of
yum used for dependency resolution.
- yum clean metadata
- Eliminate all of the files which yum uses to determine the
remote availability of packages. Using this option will force yum to
download all the metadata the next time it is run.
- yum clean dbcache
- Eliminate the sqlite cache used for faster access to
metadata. Using this option will force yum to download the sqlite metadata
the next time it is run, or recreate the sqlite metadata if using an older
repo.
- yum clean rpmdb
- Eliminate any cached data from the local rpmdb.
- yum clean plugins
- Tell any enabled plugins to eliminate their cached data.
- yum clean all
- Does all of the above.
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: 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:- [main]
FILES¶
/etc/yum/yum.conf /etc/yum/version-groups.conf /etc/yum/repos.d/ /etc/yum/pluginconf.d/ /var/cache/yum/
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-security (8) http://yum.baseurl.org/ http://yum.baseurl.org/wiki/Faq yum search 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@lists.baseurl.org or filed in bugzilla.Seth Vidal |