How to fix Ubuntu not updating issue due to the broken packages

Have you ever faced a broken package error while updating Ubuntu? Do you know that the Apt package manager has a built-in function that can help you solve this situation? Let's show you how.

Ubuntu has proven to be one of the most powerful operating systems, but from time to time, things can go wrong while performing an update process.

Have you ever faced a broken package while updating Ubuntu? Do you know that Apt (which is Ubuntu’s most famous and powerful package manager) has a built-in function that can help you solve this situation and get things back to its normal state?

During this tutorial, we are going to cover how to fix a broken package during your update process. Next, we will discuss some tips and tricks that should help you get out of the broken package situation.

Fix a Broken Package Using APT or APT-GET

As we have mentioned previously, Apt is Ubuntu’s most powerful and useful package manager. Apt has some useful flags that can be used to fix broken packages or packages that are missing some dependencies.

First Method

Step 1. Perform an update using the fix-missing option, and this step will help you to make sure that the required packages are up-to-date.

sudo apt --fix-missing update

Step 2. After the update finishes, you can force Apt to search for any broken packages or missing package dependencies and then correct them. This step will fix and repair the existing packages and install any missing packages.

sudo apt install -f

Second Method Using APT And DPKG

If the previous solution did not work, you could try the next few steps:

Step 1. Try to update your package list using the following command.

sudo apt update

Step 2. Clean up any partially installed package.

sudo apt autoclean

Step 3. Then use the next command to clean the apt cache.

sudo apt clean

Step 4. Next, you can clean up not needed dependencies.

sudo apt autoremove

During running this command, you can quickly identify the broken package. Then you can move on to the next step.

Step 5. If you have identified the package name, then you can use the next command to remove this package forcefully.

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

Fix a Broken Package Using DPKG

During the configuration process and after the installation, you may face some errors. The Apt here is not capable of doing anything. If a package fails during the configuration, the dpkg is the most appropriate tool that will take care of this situation and will fix it.

Step 1. First force the dpkg tool to reconfigure any currently broken configured package.

sudo dpkg --configure -a

If this step did not fix the problem, move on to the next step.

Step 2. List all the packages that have been marked as required to be installed by dpkg.

sudo dpkg -l | grep ^..r

After executing the previous command, you should see packages with problems.

Step 3. Now you can use the following command to remove the broken packages forcibly.

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

Step 4. After the previous command finishes successfully, then you need to clean everything using the Apt.

sudo apt clean

Step 5. Next, you can get back to your update process.

sudo apt update

Finally, in this tutorial, we have covered different methods to fix your broken or misconfigured package. Now you can move on and start using your system normally again.

Hend Adel
Hi! I'm Hend Adel, a freelancer technical geek with successful experience in Database, Linux and many other IT fields. I help to build solutions to suit business needs and creating streamlined processes. I love Linux and I'm here to share my skills via FOSS Linux! Thanks for reading my article.


Please enter your comment!
Please enter your name here




How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

5 Ways to Open a Terminal in Ubuntu

Even though Ubuntu supports many applications with amazing Graphical User Interfaces (GUI), there are always reasons why users prefer using the Terminal to perform different tasks.

How to install Wine on Fedora Workstation

Linux distributions are becoming more and more popular every day, and Fedora Workstation is not left behind. This popularity brings forth the need to run Windows applications on Linux distros like Fedora. Windows has quite some excellent Software that is not available for Linux.

How to download and install iTunes on Linux

iTunes has always been a convenient platform for downloading, organizing, playing, and syncing media between your Apple devices. It also gives users a large pool of media to buy or stream millions of songs using Apple Music.


Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

Ubuntu 19.10 (Eoan Ermine) Beta Installation and Overview

It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.

Installing multiple Linux distros on a USB drive

A bootable Linux USB drive, which also referred to as a Live USB drive, is a drive containing files that enable a computer to boot into a specific Linux distro. It is most commonly used to test-drive various Linux distros before installing on the computer for use as a daily driver.

13 ways to use the copy command in Linux (with examples)

Being a Linux user, copying files and directories is one of the everyday tasks that you have to carry out. It can be copying a file to make a backup or copy it to another partition, directory, or external storage drive.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.