How to fix Depends: package-name but it is not installable in APT
This error occurs when apt cannot find or install a required dependency. It typically happens due to missing repositories, version conflicts, held packages, or PPA issues. Fixing it involves updating your package lists, resolving conflicts, and sometimes removing problematic sources.
Quick fix
Fixes Depends: package-name but it is not installable
sudo apt update- Update your package lists
- Use apt's automatic fix mechanism
- Check for held packages
- Review and remove conflicting PPAs
sudo apt updateDepends: package-name but it is not installable
What this error means
When you run an apt command to install a package, apt performs dependency resolution—it checks what other packages (dependencies) are required for your installation to work. If apt cannot locate a specific required dependency in any of your configured repositories, or if the available version of that dependency doesn't satisfy the requirement, it displays this error. The "not installable" message means apt searched all enabled repositories and either couldn't find that package at all, or found versions that conflict with other installed packages or dependency constraints. This is common when using third-party PPAs (Personal Package Archives), when repositories become outdated, or when your system has held packages that prevent dependency resolution.
Typical symptoms
- apt install command fails with dependency error message
- Package installation gets blocked even though you have internet connectivity
- Error message lists specific package name that 'is not installable'
- Problem persists across multiple package installations
- System appears to have broken packages that cannot be automatically fixed
Common causes
- Missing or disabled repositories containing the required dependency
- Version conflicts where the dependency version required doesn't exist in your repositories
- Incompatible PPAs (third-party repositories) with your current distribution version
- Held packages preventing apt from resolving the full dependency tree
- PPA conflicts where multiple repositories provide incompatible versions
- Outdated package cache requiring refresh
How to fix "Depends: package-name but it is not installable"
Start by refreshing apt's package cache to ensure you have the latest package information from all configured repositories.
sudo apt updateThis command downloads the latest package metadata from all your configured sources. Missing packages often appear because your cache is outdated.
Apt has a built-in feature to fix broken dependencies. This is the quickest solution for most cases.
sudo apt install -fOr use the older syntax:
sudo apt-get --fix-broken installThis command attempts to correct a system with broken dependencies by automatically selecting package versions that satisfy constraints. It's non-destructive—it only removes packages if absolutely necessary.
Sometimes packages are manually marked as "held" (prevented from upgrade/change). These can block dependency resolution.
sudo apt-mark showholdIf you see any packages listed, unhold them:
sudo apt-mark unhold package-nameThen retry your original apt command. Holding is useful for preventing unwanted upgrades, but can create dependency conflicts.
Third-party repositories (PPAs) are a common source of dependency issues. Check what you have enabled:
sudo add-apt-repository --listIf you see PPAs that are outdated, for different Ubuntu versions, or no longer needed, remove them:
sudo add-apt-repository --remove ppa:username/ppa-nameAfter removing a PPA, update your package lists:
sudo apt updatePPAs are often built for specific Ubuntu releases. Using a PPA for Ubuntu 20.04 on Ubuntu 22.04, for example, can cause exactly this error.
Aptitude is a higher-level package manager that's smarter at resolving complex dependency conflicts. It can suggest alternative solutions.
sudo apt install aptitudeThen try installing your package with aptitude instead of apt:
sudo aptitude install package-nameAptitude will present multiple solutions if conflicts exist, allowing you to choose the best approach. This is more powerful than apt for tricky situations.
Sometimes cached package information becomes corrupted. Clear it completely:
sudo apt clean
sudo apt autocleanThen update again:
sudo apt updateAfter cleaning, the next apt update will re-download all package metadata, which can resolve indexing issues.
Advanced notes
Understanding Dependency Resolution: APT uses a sophisticated dependency solver. When you request a package, it must find versions of all dependencies that are compatible with each other AND with already-installed packages. This forms a "dependency graph." If no valid combination exists in your repositories, apt reports packages as "not installable."
PPA Best Practices: Always check a PPA's documentation to ensure it supports your Ubuntu version. PPAs built for Ubuntu 20.04 often won't work on 22.04 because of library version differences. Before adding a PPA, verify the supported versions.
Emergency Downgrade: If a recent upgrade broke dependencies, you can downgrade a specific package:
sudo apt install package-name=versionUse apt search package-name to find available versions.
Using apt with -o Debug: For deeper troubleshooting, see apt's reasoning:
sudo apt -o Debug::pkgProblemResolver=yes dist-upgradeThis shows apt's decision process when resolving conflicts.
Frequently asked questions
- What does "Depends: package-name but it is not installable" mean?
- When you run an apt command to install a package, apt performs dependency resolution—it checks what other packages (dependencies) are required for your installation to work. If apt cannot locate a specific required dependency in any of your configured repositories, or if the available version of that dependency doesn't satisfy the requirement, it displays this error. The "not installable" message means apt searched all enabled repositories and either couldn't find that package at all, or found versions that conflict with other installed packages or dependency constraints.
- How do I fix "Depends: package-name but it is not installable"?
- This error occurs when apt cannot find or install a required dependency. It typically happens due to missing repositories, version conflicts, held packages, or PPA issues. Fixing it involves updating your package lists, resolving conflicts, and sometimes removing problematic sources.
- What causes "Depends: package-name but it is not installable"?
- Missing or disabled repositories containing the required dependency Version conflicts where the dependency version required doesn't exist in your repositories Incompatible PPAs (third-party repositories) with your current distribution version
- Is the "Depends: package-name but it is not installable" error serious?
- It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.