Pcornel
Linux · Linux Troubleshooting

Package Problems

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

Back to the Topic

Answer

Package problems are failed installs or upgrades: dependency errors, broken or half-configured packages, repository or signature errors, and locks.

Remember

Read the exact error. Fix repositories first (apt update / dnf makecache). Don't force; repair with dpkg --configure -a/apt -f install or dnf distro-sync. Check the package history for what changed.

First checks

  • journalctl -b -p err — errors this boot
  • systemctl --failed — failed units
  • df -h; df -i — space and inodes
  • ss -tulpn — listening sockets
  • dmesg -T | tail — recent kernel messages

Verify in this order

repos healthy → dependencies resolvable → transaction runs → packages configured

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

Confirmation

Confirm action

Continue?