LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

When should you reach for rpm versus dnf?

Use dnf for installing/updating/removing (it resolves dependencies and talks to repos); use low-level rpm mainly for querying or installing a single self-contained local file.

rpm is low-level, one file, no dependency resolution; dnf is high-level, talks to repos, resolves dependencies.

* rpm for reading (query / single-file install); dnf for doing (install/update/remove with dependency resolution). *

They operate at different levels, and choosing wrong leads to dependency pain:

Capability rpm dnf
Install a local .rpm file Yes Yes
Resolve dependencies No Yes
Download from repositories No Yes
Query the package database Yes Yes
Transaction history / undo No Yes
Groups & modules No Yes

Use rpm when:

rpm -qa                     # query all installed packages
rpm -qf /usr/bin/ls         # which package owns this file
rpm -ivh local.rpm          # install a standalone local file (no deps)

Use dnf when:

dnf install httpd           # install WITH dependencies, from a repo
dnf update                  # update the system
dnf remove package          # remove, handling dependents

The rule of thumb: queryingrpm -q; installing / updating / removingdnf. The reason is dependencies: rpm happily installs a file but leaves you to satisfy its requirements by hand, whereas dnf pulls in everything needed automatically.

Mnemonic: "rpm for reading, dnf for doing."

Go deeper:

From Quiz: LIOS / Archiving and Software Packages | Updated: Jul 14, 2026