How to fix dpkg: error processing package package-name (--configure): dependency problems - leaving unconfigured in APT

APTINTERMEDIATEHIGHUpdated Sep 6, 2026· 511 views

The "dependency problems - leaving unconfigured" dpkg error occurs when a package installation or upgrade is interrupted due to unmet dependencies. This prevents the package from being fully configured. Quick fix: run "sudo apt --fix-broken install" to resolve missing dependencies.

Quick fix

Fixes dpkg: error processing package package-name (--configure): dependency problems - leaving unconfigured

sudo dpkg --configure -a
  1. Configure all pending packages first
  2. Fix broken dependencies with apt
  3. Clean the package cache and try again
  4. Check for specific errors in the configuration
apt — error
sudo dpkg --configure -a
dpkg: error processing package package-name (--configure): dependency problems - leaving unconfigured

What this error means

This error happens when dpkg (Debian Package Manager) attempts to configure a package but encounters unmet dependency requirements. The package gets "half-installed"—its files are present but it's not fully functional. The error typically appears during package upgrades, when installing .deb files directly with dpkg, or when system updates are interrupted. Unlike apt, which resolves dependencies automatically, dpkg alone cannot fetch and install missing packages, leaving the system in an inconsistent state.

Typical symptoms

  • Package commands fail with dpkg configuration errors
  • apt upgrade or install operations hang or fail
  • System cannot complete package updates
  • Running any package management command shows pending configuration errors
  • Specific packages appear in 'dpkg -l' output with status 'iH' (half-installed)

Common causes

  1. Installing a .deb file directly with 'dpkg -i' without first resolving its dependencies
  2. Interrupted package installation or upgrade (power loss, network disconnect, manual interruption)
  3. Missing library or dependency required by the package (e.g., libqt5printsupport5, kernel modules)
  4. Failed post-installation scripts due to disk space issues or missing utilities (e.g., mkinitramfs failure)
  5. Incompatible packages from different repositories or PPAs causing conflicts
  6. Corrupted dpkg database due to incomplete file system operations or disk errors

How to fix "dpkg: error processing package package-name (--configure): dependency problems - leaving unconfigured"

1Configure all pending packages first

Run dpkg with the -a flag to attempt configuring all unconfigured packages:

bash
sudo dpkg --configure -a

This forces dpkg to retry configuration for any packages left in an inconsistent state. Often this resolves the issue by itself if the dependencies are already installed.

2Fix broken dependencies with apt

If the first step doesn't work, use apt to install missing dependencies:

bash
sudo apt --fix-broken install

This command tells apt to download and install any missing dependencies required by the problematic package, then reconfigure it. This is the most common solution.

Alternatively, use the legacy flag:

bash
sudo apt-get install -f

Both commands do the same thing. Apt will show what it plans to install and ask for confirmation.

3Clean the package cache and try again

If the above steps don't work, clear apt's cache and retry:

bash
sudo apt clean
sudo apt autoclean
sudo apt update
sudo apt --fix-broken install

Sometimes stale cache entries prevent proper dependency resolution. Cleaning and updating the package index can help.

4Check for specific errors in the configuration

If the error persists, see which package is actually failing:

bash
sudo apt full-upgrade

Or list packages in an inconsistent state:

bash
dpkg -l | grep '^iH'

The output shows which packages are half-installed. You can then manually inspect what went wrong for that specific package.

5Remove and reinstall the problematic package (advanced)

If the above steps fail, remove the package entirely and reinstall it:

bash
# Remove the half-installed package
sudo apt remove package-name

# Reinstall it
sudo apt install package-name

Only do this if you're sure the package isn't a critical dependency for your system. Removing the wrong package can break your system.

For kernel-related packages (linux-image, linux-headers), be especially careful—removing them can make the system unbootable.

Advanced notes

Understanding dpkg vs apt: dpkg is the low-level package tool that handles .deb files. It does not automatically fetch dependencies from repositories—it only manages files already present on the system. apt, conversely, resolves dependencies automatically by downloading them from configured repositories.

Always use 'apt' or 'apt-get' for normal package operations. Only use 'dpkg -i' directly when you have a specific .deb file and have already installed its dependencies via apt first.

If you install a .deb file with 'dpkg -i' instead of 'apt install ./package.deb', you'll encounter this error if dependencies are missing. The correct way is:

bash
sudo apt install ./path/to/package.deb

This tells apt to install the file while resolving its dependencies.

For persistent issues: If apt still cannot resolve the dependency, check:
- Are you using custom PPAs? They may have incompatible package versions.
- Is the package available in your enabled repositories? Check /etc/apt/sources.list and /etc/apt/sources.list.d/
- Is there a version mismatch? A newer package might depend on a library version not yet available in your repos.

Frequently asked questions

What does "dpkg: error processing package package-name (--configure): dependency" mean?
This error happens when dpkg (Debian Package Manager) attempts to configure a package but encounters unmet dependency requirements. The package gets "half-installed"—its files are present but it's not fully functional. deb files directly with dpkg, or when system updates are interrupted.
How do I fix "dpkg: error processing package package-name (--configure): dependency"?
The "dependency problems - leaving unconfigured" dpkg error occurs when a package installation or upgrade is interrupted due to unmet dependencies. This prevents the package from being fully configured. Quick fix: run "sudo apt --fix-broken install" to resolve missing dependencies.
What causes "dpkg: error processing package package-name (--configure): dependency"?
Installing a .deb file directly with 'dpkg -i' without first resolving its dependencies Interrupted package installation or upgrade (power loss, network disconnect, manual interruption) Missing library or dependency required by the package (e.g., libqt5printsupport5, kernel modules)
Is the "dpkg: error processing package package-name (--configure): dependency" 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