Back to the command reference

rpm

SystemAdvancedReference only

Install and query .rpm packages

Name: rpm = RPM Package Manager (originally Red Hat Package Manager)

This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.

Description

rpm is the low-level tool of the Red Hat package system: it installs, upgrades, removes and queries .rpm files directly. Like dpkg it doesn't fetch dependencies; day to day, dnf or yum do that.

Syntax

rpm [OPTION]... PACKAGE

Common options

-ivhInstall with progress
-UvhUpgrade (or install if missing)
-eRemove a package
-qaList every installed package
-qiShow an installed package’s details
-qlList a package’s files
-qfWhich package owns a file

Examples

  • $ sudo rpm -ivh package.rpm

    Install an rpm

    Explain
  • $ rpm -qa | grep kernel

    Installed kernels

    Explain

Related