Stop apt from holding onto those annoying broken package states
Package Management (Apt/Dnf/Pacman Internals)
Stop apt from holding onto those annoying broken package states
🧩 The Challenge
Dealing with a botched update that leaves your package database in a weird partially-configured state is a nightmare. I have spent way too many nights fighting dpkg errors because apt insists on trying to fix a broken install every time I just want to install something else.
💡 The Fix
You can force the package manager to stop whining and just purge the problematic metadata that is causing the lockups. This resets the internal state for those specific stubborn files.
sudo dpkg --remove --force-remove-reinstreq [package_name]
sudo apt-get update
⚙️ Why It Works
dpkg is the engine under the hood, and by passing the force-remove-reinstreq flag, you are telling it to ignore the fact that the package is in a broken “reinst-required” state and just get rid of the files anyway.
🚀 Pro-Tip: Check /var/lib/dpkg/status for a look at the exact package flag that’s blocking you before you go in with the hammer.
Linux Tips & Tricks | © ngelinux.com | 8/14/2026
