How to fix broken packages error on Ubuntu

May 23, 2020

Welcome back to another quick solution to the normal error we usually face. Please stay tuned, like, and subscribe to our Youtube channel EFX TV. The error which can stop your system from the deep upgrade.
Without wasting time let me share the commands we will use to get this done quickly.
Use these quick commands, if you concern about fixing the broken packages, you must read this blog.


These are the bunch of codes we are going to sue today.
>sudo apt update --fix-missing
>sudo apt install -f
>sudo dpkg --configure -a
>sudo dpkg -l | grep ^..r
>sudo dpkg -l | grep ^..r
>sudo apt clean
>sudo apt update
>sudo rm /var/lib/apt/lists/lock
>sudo rm /var/cache/apt/archives/lock
>sudo apt-get update
>sudo apt-get upgrade

Explanation of the commands written above.
sudo apt update --fix-missing This command will fix all the missing items which may be the reason behind broken packages. It will fix the program to bypass the error and system update will be successful.

sudo apt install -f
This command will force the program to install which was stopped because of some broken dependencies.

sudo dpkg --configure -a
After running this command you will collect the information about all the broken packages.

sudo dpkg -l | grep ^..r
Again broken packages and their information will be gathered by the system.

sudo apt clean
It will clean the bad files or repositories. It won't affect the system anyway.

sudo apt update
This command is used to update the system using root permission.

sudo rm /var/lib/apt/lists/lock
This command will delete the lock file which stops the update process out of root.

sudo rm /var/cache/apt/archives/lock
Again we will delete the lock file from another directory.

sudo apt-get update
Very deep system update, there is no chance of any error after running this command. It will update the fixed repositories.

sudo apt-get upgrade
Finally upgrade the system to implement the fresh and fixed changes. This was the quick blog on How to fix broken packages error on ubuntu. I hope it worked for you or you can click on the video link attached below. Like and subscribe and ask the question you want to know about. Share everything. I'll be glad to help you further.



Uk2blogger