Introduction

This section covers the RedHat Package Managers (RPM):

  • How to find software ?
  • How to install software ?
  • How to remove software ?

RedHat Package Manager (RPM)

RPM stands for RedHat Package Manager . A package manager is used to install, upgrade, and remove packages.

Here is a list of distributions that are based on the RPM package format.

  • RedHat
  • CentOS
  • Fedora
  • Oracle Linux
  • Scientific Linux

The yum Command line

The yum command line utility is a package management program for those Linux distributions that use RPM packages.

You can find packages to by providing a search string to yum, e.g. yum search string. You can also display an information about a package or an application by using yum info package_name. You can install packages with the yum install [-y] package_name. Yum will typically ask you to review your request and say yes or no if you want to continue. To automatically answer yes, use -y option. Also note that installing or removing software requires root or superuser priviledges. To remove a package, it's simply yum remove package_name.

Command Meaning
yum search string Search for string.
yum info package_name Display information for package_name.
yum install [-y] package_name Install package. Use -y to indicate yes response.
yum remove package_name Remove package_name

The rpm command

In addition to the yum command, you can also use the rpm command to interact with a package manager. The rpm -qa lists all the installed packages. The rpm -qf path_to_file tells you what package that file belongs to. Using rpm -ql package_name will list all the files that belong to that particular package. To install a package, use rpm -ivh package_name.rpm. To erase or uninstall a package, use rpm -e package_name.

Command Meaning
rpm -qa List all installed packages.
rpm -qf path_to_file List what package the path_to_file belongs to.
rpm -ql package_name List package's files.
rpm -ivh package_name.rpm Install a .rpm package.
rpm -e package_name Erase (uninstall) package.

References & Resources

  • N/A