Skip to content

Yum: Package Management in Red Hat

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

or

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

or

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

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

yum install yum-downloadonly

Then to download the package:

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

or

repoquery -qla <package>