How to Fix : dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem

When you try to install a package or a tool, you get the following error: “dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem” as shown below when I tried to install the neofetch utility.

In order to solve this problem, try to first update your package repository using the command :

sudo apt-get update

Read: How to remove broken packages in Ubuntu

Next, run the dpkg configure command :

sudo dpkg –configure -a

This command will configure any packages that were left in an incomplete state due to the interruption.

It’s important to note that running this command may cause some packages to be removed or installed in order to resolve any dependency issues.

Read: How to install and uninstall applications on Ubuntu – A Beginner’s guide

Therefore, it’s important to make sure that you have a backup of your data and that you have the necessary permissions before running the command.

Finally, run the following commands in the order shown below :

sudo rm /var/lib/apt/lists/lock

sudo rm /var/cache/apt/archives/lock

cd /var/lib/dpkg/updates

sudo rm *

sudo apt-get update

Read: How to Resolve the Sub-process /usr/bin/dpkg returned an error code 1 Error in Ubuntu

You should be able to solve your problem as was the case with me :


If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

Marianne elanotta

Marianne is a graduate in communication technologies and enjoys sharing the latest technological advances across various fields. Her programming skills include Java OO and Javascript, and she prefers working on open-source operating systems. In her free time, she enjoys playing chess and computer games with her two children.

Leave a Reply