↑ ↓ select, Enter open, Esc close

Fix an interrupted installation and broken dependencies

Caution: This command changes the system. Understand what it does before you run it.

root@server
dpkg --configure -a && apt --fix-broken install

First finishes configuring all packages that were unpacked but not fully set up, for example after an interrupted update or the message dpkg was interrupted. Then apt tries to resolve unmet dependencies by installing or removing packages. Before confirming, apt shows what will be changed.

Note: Read the displayed list carefully. If apt proposes to remove many or central packages (on Plesk servers, for example, psa-* or plesk-*), abort and find the cause first.

Also searched as

  • fix apt unmet dependencies
  • dpkg was interrupted you must manually run dpkg --configure -a
  • apt install fails with dependency error
  • repair broken packages debian

Related one-liners

All in Debian and APT

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.