Pcornel
Linux · Package Management

Package Dependencies

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

Back to the Topic

Answer

Package dependencies are the other packages (or capabilities such as a library) a package needs. The package manager installs them automatically and refuses changes that would break them.

Remember

Do not force installs (--nodeps, --force) — they leave a broken system. Unmet dependencies usually mean a missing or mismatched repository. Check reverse dependencies before removing: apt rdepends --installed / dnf repoquery --whatrequires.

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 requested → dependencies resolved from enabled repositories → conflicts checked → transaction installs all

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

Confirmation

Confirm action

Continue?