How to fix E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem in APT
The dpkg package manager encountered an interruption during installation. This typically happens when a previous apt/dpkg operation was forcibly stopped. Running 'dpkg --configure -a' will recover from this state.
Quick fix
Fixes E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem
sudo dpkg --configure -a- Run dpkg --configure -a to finish incomplete packages
- Wait for the process to complete completely
- Try apt-get clean and apt-get update after completion
- If dpkg --configure -a still fails, remove problematic packages
sudo dpkg --configure -aE: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem
What this error means
This error occurs when the dpkg (Debian Package Manager) process is interrupted before it can complete its operations. The system is left with packages in an incomplete or half-configured state. Common causes include unexpected power loss, system shutdown during updates, accidental process termination, or background unattended upgrades being interrupted. The package manager cannot continue normal operations until these incomplete packages are properly configured.
Typical symptoms
- Cannot run apt-get, apt, or other package management commands
- System shows 'E: dpkg was interrupted' error message when attempting package operations
- Package updates or installations fail immediately without processing
- System may appear unresponsive during package manager operations
Common causes
- A previous apt or dpkg operation was forcibly terminated or interrupted by a system restart
- Unattended upgrades running in background were interrupted by user action
- Power failure or unexpected system shutdown during package installation
- User accidentally closed terminal or killed package manager process mid-operation
- Slow system (especially Raspberry Pi) compiling packages, user mistakenly force-stopped the process
How to fix "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem"
Open a terminal and run this command to configure any packages left in an incomplete state:
sudo dpkg --configure -aThis command will attempt to finish configuring all packages that were interrupted. It will resolve any dependency issues automatically if possible.
This command can take a very long time, especially on slower systems like Raspberry Pi. Some users have reported wait times exceeding several hours when recompiling drivers or packages from source.
Do NOT interrupt this process again. Leave your system running and be patient. If you're concerned it has frozen, check system activity with:
# Check if dpkg is still running
ps aux | grep dpkg
# Check system load
topOnce dpkg --configure -a completes, clean and update your package cache:
sudo apt-get clean
sudo apt-get updateThis ensures your package lists are fresh and removes any partially downloaded packages.
If the above command hangs or reports unresolvable dependency errors, you may need to remove specific problematic packages. First, find which package is causing issues - dpkg output will show it.
Then remove it with:
sudo dpkg -r <package-name>After removing, try sudo dpkg --configure -a again. Handle dependencies carefully by removing packages in the correct order.
If none of the above steps work and your system is critically broken:
- If you use Timeshift (Ubuntu/Linux Mint): Restore a snapshot from before the interrupted operation occurred
- If you have another backup strategy: Restore from your most recent good state
This should only be done if the package manager is completely unable to recover, as it will undo all system changes since the backup point.
Advanced notes
SELinux and AppArmor may occasionally interfere with dpkg operations. If you experience repeated interruptions even after running dpkg --configure -a, check your system security policies. On systems with persistent dpkg issues, check /var/lib/dpkg/status for corruption - in extreme cases, backing it up and restoring from /var/lib/dpkg/status-old can help. Different distributions (Ubuntu, Debian, Linux Mint, Raspberry Pi OS) may have slightly different package manager implementations, but dpkg --configure -a works consistently across all of them.
Frequently asked questions
- What does "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' t" mean?
- This error occurs when the dpkg (Debian Package Manager) process is interrupted before it can complete its operations. The system is left with packages in an incomplete or half-configured state. Common causes include unexpected power loss, system shutdown during updates, accidental process termination, or background unattended upgrades being interrupted.
- How do I fix "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' t"?
- The dpkg package manager encountered an interruption during installation. This typically happens when a previous apt/dpkg operation was forcibly stopped. Running 'dpkg --configure -a' will recover from this state.
- What causes "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' t"?
- A previous apt or dpkg operation was forcibly terminated or interrupted by a system restart Unattended upgrades running in background were interrupted by user action Power failure or unexpected system shutdown during package installation
- Is the "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' t" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐Debian Wiki: Package Management(Official Docs)
- ๐ฌLinux Mint Forums: dpkg interrupted solution(Stack Overflow)