Pcornel
Linux · Package Management › RHEL / Rocky / AlmaLinux

RPM

Cheat sheet · https://pcornel.dk/topic.php?topic=2744

Back to the Topic

Answer

RPM is the low-level package format and tool on RHEL-family systems: rpm -q queries installed packages, rpm -qi details, rpm -ql files, rpm -qf the owner of a file, and rpm -V verifies files against the package database.

Remember

Install with dnf rather than rpm -i so dependencies are resolved. rpm -V <pkg> shows changed files (S size, 5 checksum, M mode). rpm --import adds signing keys.

First checks

  • apt policy <pkg> / dnf info <pkg> — installed and candidate versions
  • dpkg -l <pkg> / rpm -q <pkg> — installed package
  • apt-cache depends <pkg> / dnf repoquery --requires <pkg> — dependencies
  • dpkg -S <file> / rpm -qf <file> — package owning a file

Verify in this order

package installed → files and checksums recorded in the RPM database → queries and verification use that database

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2744

Confirmation

Confirm action

Continue?