Skip to main content
Administrators frequently need to install new software or tools on a Linux system. Manually downloading and installing programs can lead to dependency issues, version conflicts, and security risks. Linux distributions solve these problems using signed software repositories and package management tools that automate dependency resolution and verify package integrity. This lesson explains how Linux handles software installation by covering:
  • RPM: the low-level package format and tooling used by Red Hat–style distributions
  • Common RPM commands for inspecting and manipulating package files
  • A concise demo showing typical RPM workflows
  • When to use a higher-level package manager such as DNF for dependency resolution and repository handling
We start with RPM (Red Hat Package Manager), the low-level tool used to manage software packages on Red Hat Enterprise Linux and related distributions. Think of an RPM file as a boxed product in a warehouse: the package contains the files and metadata required to install an application, and the package manager places those files into the correct system locations.
A schematic titled "Package Management" showing a warehouse of boxed RPM packages being sent to a package manager. The package manager then places the packages (files) in the correct system locations.
What RPM does (and what it does not)
  • Installs, removes, queries, and verifies individual RPM package files
  • Tracks package metadata (version, vendor, files list, checksums)
  • Does not automatically resolve or fetch dependencies from repositories
For dependency resolution and repository management use DNF (which calls into RPM to perform the actual package operations). Common RPM operations
  • Install a local RPM file
  • Query package metadata and contents
  • List installed packages
  • Verify package integrity
  • Remove packages
Summary of frequently used rpm options
RPM performs package installation and management but does not resolve dependencies. For typical system administration tasks use DNF, which handles dependency resolution and works with repositories while relying on RPM for the low-level package operations.
A dark-themed presentation slide titled "Demo — Working with RPM." Two rounded content boxes read "Most common RPM operations" and "How RPM works behind the scenes."
Demo — working with an RPM package The following concise demo shows common RPM commands and their outputs. The prompt is the root account (root@control), so sudo is not used.
  1. Confirm the RPM file exists in the current directory:
  1. Inspect package file metadata (query a package file):
  1. List the files that would be installed by the package:
  1. Install the package (if not already installed):
(The output above indicates the package was already present on the system.)
  1. Verify the package is installed and display short and detailed info:
  1. Find which installed package owns a specific file:
  1. Remove the package:
  1. Confirm the package was removed:
Additional useful RPM operations
  • Verify an installed package’s integrity and detect changed files: rpm -V package_name
  • List all installed packages: rpm -qa
  • Operate directly on package files with -p variants (e.g., rpm -qpi package.rpm, rpm -qpl package.rpm)
Best practices and next steps
  • Use RPM for low-level inspection, verification, and manual installs from .rpm files.
  • For routine software installation, updates, and repository management use DNF (it resolves dependencies, fetches packages from configured repositories, and signs metadata).
  • Always prefer signed repository sources and verify package signatures when available.
Links and references

Watch Video