How to fix broken packages in Ubuntu 20.04

The command terminal in Linux, whether it is Ubuntu 20.04 LTS or any other operating system, is the key component to update and install software packages. And the tool that we use to manage the installation and uninstall of various system packages is called a Package manager. For example, Ubuntu Linux comes with APT and CentOS with YUM or DNF. It also allows us to update and upgrade the system along with resolving and installing various dependencies required by some particular program.

Well, many times while installing some third party software or during updating or upgrading, if something happens undesirable; for example, you accidentally canceled the process in the middle which results in errors such as missing dependencies and broken packages. Apart from that, setting up packages or dependencies incorrectly could also lead to such errors, thus here in this tutorial, we will see how to rectify fix broken packages error on Ubuntu 20.04 LTS focal fossa.

Try the below-given commands one by one:

sudo apt-get update –fix-missing

sudo dpkg –configure -a

sudo apt-get install -f

If after uninstalling some software, you keep the broken dependencies or packages while updating system, you can run commands:

sudo apt clean

sudo apt autoremove

sudo dpkg --remove -force --force-remove-reinstreq Package_Name

Replace the Package_Name with packages that are creating the problem.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.