This is one of the most honest errors in Linux: it tells you what happened and what to run. A package operation has two halves - unpacking files, then configuring them. If the terminal was closed, the PC lost power, or the updater crashed between those halves, some packages sit in the database as unpacked but not configured. dpkg refuses to start anything new on top of that unfinished state, so apt shows E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem for every command. The fix is a short, strict sequence: configure everything pending, repair dependencies, finish the interrupted upgrade, and audit the result. This is an Ubuntu and Debian family problem only - Fedora (dnf) and Arch (pacman) do not use dpkg and never show this error.
X sudo apt install, sudo apt update and Software Updater all fail with this same message
X It started after an install or upgrade window was closed, crashed, or the power went mid-update
X The desktop and your files work normally - only package operations are blocked
DPKG Packages are half-configured, and dpkg is frozen until they are finished.
The fingerprint of this problem: the exact E: dpkg was interrupted line, word for word, on every apt command.
This is the main fix, and there is no shortcut around it. The command configures every package that was left unpacked-but-not-configured by the interruption, finishing the original job instead of rolling it back.
sudo dpkg --configure -a
An interrupted upgrade often leaves a package installed without the dependency version it needs. This command makes apt resolve that state - installing missing dependencies or removing what cannot be satisfied.
sudo apt --fix-broken installThe original update never completed, so some upgrades are still pending even after the database is repaired. Refresh the package lists and apply the full upgrade so the system reaches the state the interrupted run was heading for.
sudo apt update - this should now run without the dpkg error, which is your first proof the freeze is gone.sudo apt full-upgrade - full-upgrade is used instead of a plain upgrade because it is allowed to install or remove dependencies when an upgrade requires it, which interrupted release upgrades often do.Do not declare victory because the error disappeared once. One command audits the entire package database and reports any package still in a half-finished state.
sudo dpkg --auditsudo dpkg --configure -a, then sudo apt --fix-broken install - targeting that named leftover.sudo apt update followed by sudo apt full-upgrade one last time. A fully repaired system ends with nothing left to do and no errors.Nothing to download and no Live USB is needed - dpkg and apt are the built-in package tools of Ubuntu and Debian, and every command in this guide uses only them. You need a terminal, your sudo password, a stable power connection, and a few uninterrupted minutes. Because Fedora uses dnf and Arch uses pacman instead of dpkg, there is no Fedora or Arch version of this guide: those systems never produce this error and have their own, different interrupted-transaction handling.
Every week: Windows and Linux problems, hidden tools and full setup guides, explained step by step.
Subscribe on YouTubedpkg keeps a record of every package state. When an install or upgrade stops halfway, some packages are left unpacked but not configured, and dpkg marks the database as interrupted. For safety, apt then refuses all installs, removals and upgrades until that half-finished work is configured - otherwise new changes would be layered on top of a broken state.
The -a means all: dpkg goes through every package that was unpacked but never configured and runs its configuration step now - creating config files, running its setup scripts and registering it properly. It finishes the interrupted job instead of undoing it, which is why it is the correct first command and why the error message itself names it.
Read the package name and error it prints - it has narrowed the problem to one package. Run sudo apt --fix-broken install next, which resolves missing dependencies around it. If one named package still fails repeatedly, removing just that package with sudo apt remove, then running the sequence again and reinstalling it cleanly, is the standard last resort for that single package.
Run sudo dpkg --audit. No output at all means no package is half-configured or half-installed - the database is clean. Follow it with sudo apt update and sudo apt full-upgrade: a healthy system ends with 0 upgraded, 0 newly installed, 0 to remove and no errors.
No. dpkg is the package tool of the Debian family only - Ubuntu, Debian, Linux Mint and their relatives. Fedora uses dnf and RPM and Arch uses pacman, and neither has dpkg, so this exact error and this exact fix exist only on Ubuntu and Debian family systems.