O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

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

Name

yum — stdin  stdout  - file  -- opt  --help  --version

Synopsis

yum [options] [packages]

yum is a popular package manager for RPM packages (.rpm files) found on Red Hat Enterprise Linux, Fedora, CentOS, and other distros. It is primarily a command-line tool, though you may encounter graphical front-ends for yum, such as PackageKit on Fedora Linux.

The following table lists common operations with yum. For operations on local files, which yum does not provide, we use the rpm command directly.

Action

yum command

Search for a package that meets your needs (supports wildcards * and ?).

yum search command_name

Check if a package is installed.

yum list installed 
 package_name

Download a package but don’t install it. This requires installing the downloadonly plugin first by running:

yum install yum-downloadonly
yum --downloadonly install 
 package_name

Download and install a package.

yum install package_name

Install a package file.

rpm -ivh package.rpm

Learn about a package.

yum info package_name

List the contents of a package.

rpm -ql package_name

Discover which package an installed file belongs to.

yum provides /path/to/file

Update an installed package.

yum update package_name

Remove an installed package.

yum remove package_name

List all packages installed on the system.

yum list installed | less

Check for updates for all packages on the system.

yum check-update

Update all packages on the system.

yum update

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