How to Fix E: Sub-process /usr/bin/dpkg returned an error code (1)

operating system 1995434 1280

You might have got this error while installing or updating some packages in debian based Linux. Dpkg retured and error code(1) means the package is corrupted or either broken.

Different type of methods

You may have tried to fix this with

sudo dpkg --configure -a


sudo apt install --fix-broken


sudo apt autoremove

etc and so on. A lot of times these method works but if it is still not solved then here’s how to solve.

Most effective method to solve this error

This method include removing all files related to the corrupted file. Don’t worry you can download them again and it won’t affect your existing files and applications.

First you need to see all the files that are causing this problem. For that just ls /var/lib/dpkg/info You might have got lot of files we just need corrupted file in our case it is bacula-console-qt so we’ll use grep to filter the files.

sudo ls -l /var/lib/dpkg/info | grep -i bacula-console-qt

we get list of all files

We’ll move all those files into tmp folder. to choose all the files we’ll use regular expression * for common word

sudo mv  /var/lib/dpkg/info/bacula-console-qt.* /tmp

Finally update

sudo apt update

Error solved now try to install.

No error this time.

Related Posts

4 thoughts on “How to Fix E: Sub-process /usr/bin/dpkg returned an error code (1)

  1. Hope this message finds you in the best of spirits. Please unblock me bro ly ๐Ÿ’—
    Also did u her aswal jee percentile? So epic personality he is and Karan also

Leave a Reply to Harshit J Cancel reply

Your email address will not be published.