How to Fix Broken Dependencies on Linux
Resolve broken dependencies on Linux and clean stale package cache and leftovers with Kudu.
By Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
Broken dependencies on Linux usually happen when a package installs, upgrades, or removes only part of what another package needs. This can be caused by interrupted updates, mismatched software repositories, manually installed .deb or .rpm files, or old package cache data that conflicts with newer versions. In some cases, leftover package metadata or partially removed packages keep the package manager stuck in an inconsistent state.
Common Symptoms
- App installs fail with dependency or unmet package errors
- Software updates stop partway through or refuse to start
- The package manager reports broken, held, or partially installed packages
- You see messages about missing libraries or version conflicts
- Old package files and leftovers keep taking up disk space
How to Fix It Manually
-
Back up important files first
- Before making package changes, save any important work.
- If you're using a Linux VM or dual-boot setup on your Windows PC, create a restore point or snapshot if available.
-
Open a terminal
- On most Linux desktops, press
Ctrl+Alt+T. - If that doesn't work, open the app launcher and search for Terminal.
- On most Linux desktops, press
-
Refresh package lists
- On Debian-based systems like Ubuntu, run:
sudo apt update - This updates your local package index so the system can find the correct versions.
- On Debian-based systems like Ubuntu, run:
-
Try repairing broken packages
- Run:
sudo apt --fix-broken install - Then finish any incomplete package setup:
sudo dpkg --configure -a - If a package is stuck, remove it:
Replacesudo apt remove package-namepackage-namewith the actual package causing the error.
- Run:
-
Clean stale package cache and unused files
- Remove cached package files that may be outdated:
sudo apt clean - Remove packages that were installed as dependencies but are no longer needed:
sudo apt autoremove - This helps clear out leftovers that can contribute to conflicts.
- Remove cached package files that may be outdated:
-
Check for held or conflicting packages
- List held packages:
apt-mark showhold - If needed, unhold a package:
sudo apt-mark unhold package-name - Held packages can block upgrades and create dependency chains that never resolve properly.
- List held packages:
-
Verify your software sources
- If the issue started after adding a third-party repository, disable it and update again.
- On Ubuntu, you can open Software & Updates from the app menu and review the Other Software tab.
- Then run:
sudo apt update sudo apt upgrade - Mixing incompatible repositories is a common cause of dependency problems.
-
Reboot and test installs again
- Restart the system after repairs:
sudo reboot - After rebooting, try the failed install or update again to confirm the dependency issue is gone.
- Restart the system after repairs:
Fix It Automatically with Kudu
If you don't want to sort through package leftovers, stale cache, and failed dependency cleanup by hand, Kudu can help automate the cleanup process. It can detect junk files, remove stale package cache and leftovers, and make it easier to recover disk space and reduce clutter after package problems.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Remove App Cache on Linux
Clean application cache on Linux to recover space and reduce clutter using Kudu.
How to Fix Apps Opening Slowly on Linux
If Linux apps take too long to open, Kudu can help clean caches and reduce system clutter.
How to Remove APT Cache on Linux
Free up storage by cleaning APT cache files on Linux with Kudu’s cleanup tools.
How to Fix Could Not Get Lock Error on Linux
Resolve APT lock errors on Linux and clean package-related clutter with help from Kudu.