O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The yum Command

The yum command is an automated system for updating rpm-based packages, particularly on Fedora and Red Hat Enterprise Linux. Yum can automatically install, upgrade, and remove packages. In addition to individual packages or a list of packages, yum can operate on an entire group of packages at a time.

When you run yum, it first updates the cache (unless you tell it not to with the -C option); then it proceeds to perform the requested operation.

The format of the yum command is:

yum [options] [command] [package ...]

Any general options are specified first, followed by a command telling yum what you want it to do, usually followed by a list of one or more packages. The command is always required, except with the --help, -h, and --version options.

Package names can be specified in various combinations of name, architecture, version, and release. For example, you could refer to the bash package as bash, bash.x86_64, bash-3.2, bash-3.2-30, or bash-3.2-30.fc10.x86_64.

General options

The following general options can be set on the command line. For those that can also be set in the [main] section of the yum.conf configuration file, the name of the configuration option is given.

-c [onfig-file]

Specify the location of the yum configuration file. The file can be specified as a path to a local file or as an HTTP or FTP URL. The default is /etc/yum.conf.

-C

Run entirely from the local cache. Don’t download or update headers unless required to complete the requested action.

-d [num]

Set ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required