How to fix E: Unmet dependencies. Try 'apt --fix-broken install' with no packages in APT
When apt package manager encounters broken dependencies, it prompts you to run 'apt --fix-broken install'. This error indicates that your package dependency chain is broken and needs repair before you can install or upgrade packages.
Quick fix
Fixes E: Unmet dependencies. Try 'apt --fix-broken install' with no packages
sudo apt-get update
sudo apt --fix-broken install- Update package lists and attempt automatic dependency fix
- Check for held packages preventing dependency resolution
- Use apt-get with problem resolver debug to see detailed dependency info
- Use aptitude for more intelligent dependency resolution
sudo apt-get updatesudo apt --fix-broken installE: Unmet dependencies. Try 'apt --fix-broken install' with no packages
What this error means
Unmet dependencies occur when the apt package manager detects that one or more packages require other packages that are either missing, incompatible, or not installed. This typically happens during package installations, upgrades, or removals when a package's required dependencies cannot be satisfied. The package manager intentionally blocks the operation to prevent system instability. The error suggests running 'apt --fix-broken install' to automatically resolve dependency issues by downloading and installing the required packages. However, this command sometimes fails if the dependency conflict is too complex or if problematic packages need to be removed.
Typical symptoms
- apt, apt-get, or other package managers fail with 'Unmet dependencies' message
- System package updates fail midway through installation
- Third-party repository packages create dependency conflicts
- Held packages (packages marked to not be upgraded) prevent dependency resolution
- Installation fails even after running 'apt --fix-broken install'
Common causes
- Partial or interrupted package installation leaving broken dependencies
- Third-party APT repositories with incompatible package versions
- Packages held at specific versions that don't satisfy other packages' requirements
- Conflicting packages from multiple repositories trying to install simultaneously
- Manually installed packages without proper dependency checks
How to fix "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages"
First, update your package cache and try the automatic fix suggested by apt:
sudo apt-get update
sudo apt --fix-broken installThis command tells apt to download and install any missing dependencies. If this succeeds, your issue is resolved.
If the above fails, check if any packages are held (prevented from being upgraded/removed):
apt-mark showholdIf packages are held, they may prevent dependency resolution. You can unhold them with:
sudo apt-mark unhold package-name
sudo apt --fix-broken installReplace package-name with the actual package name shown in the hold list.
For more detailed information about what's causing the dependency conflict:
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgradeThe verbose output will show which packages are conflicting and why. This helps you understand what's happening so you can make informed decisions about which packages to remove or downgrade.
The aptitude package manager is often better at resolving complex dependency conflicts than apt-get:
sudo apt-get install aptitude
sudo aptitude install -fAptitude uses more sophisticated algorithms to find solutions and may succeed where apt-get fails. It may suggest removing or downgrading conflicting packages.
If previous steps fail, you may need to remove the packages causing the conflict. First, use apt to show which packages are broken:
sudo apt-get checkOnce you identify the problematic package, try a dry run first:
sudo apt-get remove --dry-run package-nameIf the dry run looks safe, remove it:
sudo apt-get remove package-name
sudo apt --fix-broken installThen you can reinstall the package or find a compatible alternative version.
If a package is causing conflicts, you can explicitly install a compatible version:
sudo apt-get install package-name=version-numberFirst, see available versions:
apt-cache policy package-nameThis shows all available versions in your repositories. Choose a compatible one and install it explicitly.
Advanced notes
For persistent issues, investigate your APT sources. Third-party PPAs (Personal Package Archives) are a common culprit. List your sources with 'software-properties-gtk' or by checking '/etc/apt/sources.list' and '/etc/apt/sources.list.d/'. Disabling problematic repositories often resolves unmet dependencies. If you're using containers or cloud instances, ensure your base image's package repositories are compatible with any third-party packages you're adding. Some distributions (Ubuntu, Debian, Linux Mint) have slightly different repository configurations that can cause conflicts if mixed.
Frequently asked questions
- What does "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages" mean?
- Unmet dependencies occur when the apt package manager detects that one or more packages require other packages that are either missing, incompatible, or not installed. This typically happens during package installations, upgrades, or removals when a package's required dependencies cannot be satisfied. The package manager intentionally blocks the operation to prevent system instability.
- How do I fix "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages"?
- When apt package manager encounters broken dependencies, it prompts you to run 'apt --fix-broken install'. This error indicates that your package dependency chain is broken and needs repair before you can install or upgrade packages.
- What causes "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages"?
- Partial or interrupted package installation leaving broken dependencies Third-party APT repositories with incompatible package versions Packages held at specific versions that don't satisfy other packages' requirements
- Is the "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages" 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
- ๐APT Official Documentation
- ๐apt manual pages(Official Docs)