Dpkg Was Interrupted You Must Manually Run Sudo Dpkg Configure To Correct The Problem Page
sudo dpkg --force-all --configure broken-package The file /var/lib/dpkg/status holds the state of every package on your system. If it's corrupted, you can rename the old one and create a new one from the backups:
| Scenario | Command | | :--- | :--- | | | sudo dpkg --configure -a | | Fix broken dependencies after | sudo apt-get install -f | | Remove lock files manually | sudo rm /var/lib/dpkg/lock-frontend /var/lib/dpkg/lock | | Reconfigure pending packages only | sudo dpkg --configure --pending | | Audit the package database | sudo dpkg --audit | | Force remove a problematic package | sudo dpkg --force-depends --remove <package-name> | | Restore dpkg status from backup | sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status | Conclusion The message "dpkg was interrupted – you must manually run sudo dpkg --configure -a" is one of the most common errors on Debian-based systems, but it is also one of the easiest to fix. In most cases, simply running the suggested command resolves everything in under ten seconds. First, find the problematic package: If you encounter
First, find the problematic package:
If you encounter stubborn lock files or a failing post-installation script, the advanced methods outlined above will restore your package manager without requiring a full system reinstall. To fix this, you need to forcibly reinstall
sudo dpkg --force-depends --remove broken-package sudo apt-get install broken-package Or, reconfigure it manually: To fix this
sudo dpkg --configure -a | grep -oP "Package: \K.*" If you identify a package (e.g., broken-package ), try:
sudo dpkg --audit sudo dpkg --configure --pending The --pending flag forces dpkg to configure only those packages that are marked as "unpacked but not configured." Sometimes, a specific package's post-installation script ( postinst ) is crashing. Dpkg will try to run it and fail repeatedly. To fix this, you need to forcibly reinstall or remove the offending package.
