Pcornel
Linux

Package Management

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

Back to the Topic

Answer

Package management installs, updates and removes software from trusted repositories, resolving dependencies: APT/dpkg on Debian and Ubuntu, DNF/RPM on RHEL, Rocky, AlmaLinux and Fedora.

Remember

Refresh metadata first, keep repositories signed and supported, never force installs, and review what an upgrade will change. Keep the history (/var/log/apt/history.log, dnf history) for rollback and audits.

First checks

  • apt update / dnf makecache — refresh metadata
  • apt list --upgradable / dnf check-update — pending updates
  • apt policy <pkg> / dnf info <pkg> — versions and source repository
  • dnf history / less /var/log/apt/history.log — past transactions

Verify in this order

repositories → signed metadata → dependency resolution → download → install → history recorded

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=360

Confirmation

Confirm action

Continue?