How to fix dpkg: dependency problems prevent configuration of package-name in APT

APTBEGINNERMEDIUMUpdated Dec 29, 2025· 307 views

This error occurs when a package cannot be configured because its required dependencies are missing or unmet. It typically results from installing .deb files with dpkg instead of apt, interrupted package manager operations, or incomplete updates, and can be resolved using apt-get install -f or dpkg --configure -a.

Quick fix

Fixes dpkg: dependency problems prevent configuration of package-name

sudo apt update
  1. Update your package lists
  2. Fix broken dependencies with apt install -f
  3. Configure any remaining unconfigured packages
  4. Verify your package manager is healthy
apt — error
sudo apt update
dpkg: dependency problems prevent configuration of package-name

What this error means

When dpkg tries to configure a package that has already been unpacked, it checks for all required dependencies. If any are missing or their versions do not satisfy the package requirements, dpkg halts the configuration process. This error indicates that the package is in an "unpacked but not configured" state, which blocks the package from being usable. This commonly happens when using dpkg directly to install .deb files without letting apt manage dependencies, or when package manager operations are interrupted mid-process.

Typical symptoms

  • apt or apt-get commands fail with dependency errors
  • Installation or update operations hang or fail unexpectedly
  • A specific package is left in an unconfigured state
  • System cannot proceed with upgrades until the error is resolved
  • Running sudo apt update shows broken packages

Common causes

  1. Installing .deb files directly with dpkg instead of using apt, which cannot resolve dependencies
  2. Interrupted package manager operations or system shutdowns during installation
  3. Incomplete previous system updates or partial upgrades
  4. Installing packages from incompatible repositories with conflicting dependency versions
  5. Corruption or removal of required dependency packages after installation

How to fix "dpkg: dependency problems prevent configuration of package-name"

1Update your package lists

First, refresh the package manager cache to ensure you have the latest information about available packages and their versions:

bash
sudo apt update

This step ensures that apt can find the correct versions of missing dependencies.

2Fix broken dependencies with apt install -f

Run apt with the fix-broken flag to automatically install missing dependencies:

bash
sudo apt install -f

Alternatively, you can use the longer form:

bash
sudo apt --fix-broken install

This command identifies missing dependencies and attempts to install them from your configured repositories. Review the proposed changes before confirming.

3Configure any remaining unconfigured packages

If the previous step does not fully resolve the issue, configure all unpacked but unconfigured packages:

bash
sudo dpkg --configure -a

This command processes all packages that have been unpacked but not yet configured, completing their installation.

4Verify your package manager is healthy

Check that your package manager is in a consistent state:

bash
sudo apt check

This command reports any remaining broken dependencies. If it runs without output or says "All packages are healthy", the issue is resolved.

5Complete any pending operations

If there are still issues, run an upgrade to complete any interrupted operations:

bash
sudo apt upgrade

Review the changes carefully. If apt asks to remove packages, understand why before proceeding.

6Use apt instead of dpkg for future installations

To avoid this error in the future, always use apt to install .deb files instead of dpkg:

bash
sudo apt install ./package-name.deb

Instead of:

bash
sudo dpkg -i package-name.deb

Apt automatically handles dependencies and is safer for system consistency.

Advanced notes

The dpkg --configure -a command is a safe, non-destructive operation that only processes configuration scripts for already-unpacked packages. It can be run multiple times without harm. If apt install -f fails with specific package names, you may need to manually investigate those packages using apt policy package-name to understand which versions are available. In some cases, you may need to remove conflicting packages with apt remove before the dependency resolution can proceed. If you have added third-party PPAs or repositories, temporarily disabling them can help identify which repository is causing the conflict. Remember that using dpkg directly bypasses the dependency resolution system entirely—dpkg is meant for system maintenance, not routine package installation.

Frequently asked questions

What does "dpkg: dependency problems prevent configuration of package-name" mean?
When dpkg tries to configure a package that has already been unpacked, it checks for all required dependencies. If any are missing or their versions do not satisfy the package requirements, dpkg halts the configuration process. This error indicates that the package is in an "unpacked but not configured" state, which blocks the package from being usable.
How do I fix "dpkg: dependency problems prevent configuration of package-name"?
This error occurs when a package cannot be configured because its required dependencies are missing or unmet. It typically results from installing .deb files with dpkg instead of apt, interrupted package manager operations, or incomplete updates, and can be resolved using apt-get install -f or dpkg --configure -a.
What causes "dpkg: dependency problems prevent configuration of package-name"?
Installing .deb files directly with dpkg instead of using apt, which cannot resolve dependencies Interrupted package manager operations or system shutdowns during installation Incomplete previous system updates or partial upgrades
Is the "dpkg: dependency problems prevent configuration of package-name" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading