YUM and RPM

From Peter Pap's Technowiki
Jump to: navigation, search

YUM (Yellowdog Updater, Modified) has become the defacto standard for managing packages on CentOS, RedHat and Fedora. The benefits are obvious in that if you go to install a package, it will tell if there are any other required packages and will offer you the option of installing them. You can still use RPM (RedHat Package Manager), but of course then you're on your own when it comes to downloading and installing other required packages. Here are some useful YUM and RPM commands.


YUM

List all available packages for Installation

This command:

  yum -y list

will give you the complete list of packages that can be downloaded and installed with the yum command. Very useful for searching with 'grep'.

Show which user has performed yum tasks in the past

  yum history

Show the yum history of a given package

  yum history info package_name

This will show every time the package_name in a yum action, i.e. when it was installed, updated, erased etc, and during which yum Transactions it occurred. VERY HANDY when trying to figure out who installed what and when!


RPM

Using RPM to see if a package is installed

  rpm -qa package_name