Package Problems
Cheat sheet · https://pcornel.dk/topic.php?topic=2921
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 bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -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