How to fix E: Unmet dependencies. Try using -f in APT

APTINTERMEDIATEHIGHUpdated Dec 29, 2025ยท 283 views

The "E: Unmet dependencies. Try using -f" error occurs when apt package dependencies are broken. The -f flag (or --fix-broken) tells apt to automatically install missing dependencies and resolve conflicts to repair your package system.

Quick fix

Fixes E: Unmet dependencies. Try using -f

sudo apt update
  1. Update package lists
  2. Use -f flag to fix broken dependencies
  3. Check if the fix was successful
  4. Use -f with autoremove to clean up broken dependencies
apt โ€” error
sudo apt update
E: Unmet dependencies. Try using -f

What this error means

Unmet dependencies happen when the apt package manager detects that installed or installable packages have unsatisfied requirements. The error suggests using the -f flag as a quick automatic fix. This flag instructs apt to download and install any missing packages needed to satisfy dependencies, which typically resolves most broken dependency situations. Without the -f flag, apt refuses to perform the requested operation to prevent system corruption. The -f flag enables "fix-broken" mode, allowing apt to take corrective action. In some cases, apt may need to remove conflicting packages to resolve the issue.

Typical symptoms

  • apt install/remove/upgrade commands fail with 'Unmet dependencies' message
  • Cannot install new packages due to dependency conflicts
  • System upgrades fail partway through
  • Package manager shows warnings about broken packages
  • Error message specifically suggests 'Try using -f'

Common causes

  1. Partial or interrupted package installation leaving broken state
  2. Conflicting versions between packages from different repositories
  3. Third-party PPAs (Personal Package Archives) with incompatible packages
  4. Manually removed packages without resolving dependent packages
  5. Packages held at specific versions that prevent dependency satisfaction

How to fix "E: Unmet dependencies. Try using -f"

1Update package lists

First, refresh your package cache to ensure apt has the latest package information:

bash
sudo apt update

This synchronizes your local package index with the latest available packages in your repositories. Often, simply updating the cache can resolve dependency issues.

2Use -f flag to fix broken dependencies

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

bash
sudo apt install -f

Or using apt-get:

bash
sudo apt-get install -f

The -f flag (short for --fix-broken) tells apt to:
- Identify missing packages required by other packages
- Download and install those missing packages
- Remove packages that cannot have their dependencies satisfied

This command requires no package names - apt automatically determines what needs to be fixed.

3Check if the fix was successful

After running the above command, verify the system is healthy:

bash
sudo apt check

If this command completes without errors, your package system is repaired. Try your original operation again:

bash
sudo apt install package-name
4Use -f with autoremove to clean up broken dependencies

If apt still shows issues, combine the fix with autoremove to eliminate unused packages:

bash
sudo apt install -f
sudo apt autoremove

The autoremove command removes packages that were automatically installed as dependencies but are no longer needed. This often resolves lingering dependency conflicts.

5Try dpkg --configure if apt install -f fails

If apt install -f doesn't work, dpkg (the lower-level package manager) may need to finish configuring partially-installed packages:

bash
sudo dpkg --configure -a
sudo apt install -f

The -a flag tells dpkg to configure all unconfigured packages. Run this before apt install -f for best results.

6Use dist-upgrade as last resort

If basic fixes fail, dist-upgrade (distribution upgrade) sometimes has better dependency resolution:

bash
sudo apt-get dist-upgrade

Warning: dist-upgrade may upgrade or downgrade packages. It's more aggressive than regular upgrade but sometimes necessary for complex dependency situations. Always review the changes it proposes before confirming.

Advanced notes

The -f flag is a shortcut for --fix-broken. Both do exactly the same thing. The single-letter flag is often preferred in scripts and commands for brevity.

If you're still having issues after using -f:

1. Check your APT sources: Third-party PPAs are frequently the culprit. Review '/etc/apt/sources.list' and '/etc/apt/sources.list.d/'. Consider disabling PPAs temporarily to see if they cause the issue.

2. Use apt --fix-missing instead: This variant is sometimes more conservative: sudo apt install --fix-missing.

3. Check held packages: Held packages (marked to not upgrade) can prevent dependency resolution. List them with apt-mark showhold. Remove holds if needed: sudo apt-mark unhold package-name.

4. Try aptitude: The aptitude package manager uses more sophisticated algorithms: sudo aptitude install -f. First install it: sudo apt install aptitude.

5. Last resort - identify and remove the conflicting package manually using apt-get check to see what's broken, then remove it with sudo apt remove package-name.

Frequently asked questions

What does "E: Unmet dependencies. Try using -f" mean?
Unmet dependencies happen when the apt package manager detects that installed or installable packages have unsatisfied requirements. The error suggests using the -f flag as a quick automatic fix. This flag instructs apt to download and install any missing packages needed to satisfy dependencies, which typically resolves most broken dependency situations.
How do I fix "E: Unmet dependencies. Try using -f"?
The "E: Unmet dependencies. Try using -f" error occurs when apt package dependencies are broken. The -f flag (or --fix-broken) tells apt to automatically install missing dependencies and resolve conflicts to repair your package system.
What causes "E: Unmet dependencies. Try using -f"?
Partial or interrupted package installation leaving broken state Conflicting versions between packages from different repositories Third-party PPAs (Personal Package Archives) with incompatible packages
Is the "E: Unmet dependencies. Try using -f" 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