Introduction

Yum, which stands for Yellow dog Updater Modified, is a package manager for Linux distributions like Fedora and Red Hat Enterprise Linux, created by Yellow Dog Linux.

It allows you to manage the installation and updating of software installed on a distribution. It’s a layer on top of RPM that handles downloads and dependencies, similar to Debian’s APT or Mandriva’s Urpmi.

Usage

  • Installing a package:
1
yum install <package>
  • Reinstalling a package:
1
yum reinstall <package>
  • Installing a local RPM:
1
yum localinstall <package.rpm>
  • Removing a package:
1
yum remove <package>
  • Updating packages or a specific package:
1
yum update <package>
  • Getting information about a package:
1
yum info <package>
  • Installing a package group:
1
yum groupinstall <group>
  • Viewing available packages (installed or not):
1
yum list

or

1
yum list htt*
  • Viewing available package groups:
1
yum grouplist
  • Viewing repositories:
1
yum repolist
  • Finding which package a file belongs to (equivalent of apt-file):
1
yum provides <file/command>

or

1
yum whatprovides <file/command>
  • Ignoring missing GPG key:
1
yum ... --nogpg
  • Listing all installed packages:
1
yum list installed
  • Forcing the protection of an rpm on a specific redhat version:
1
yum protectbase <package>
  • Checking compatibility:
1
yum verify <package>
  • Downloading packages only

You will need the yum-downloadonly package first to have this option in yum:

1
yum install yum-downloadonly

Then to download the package:

1
yum install -y postfix --downloadonly
  • Viewing the contents of a package:
1
rpm -qla <package>

or

1
repoquery -qla <package>

Last updated 02 Mar 2012, 19:08 +0200. history