Let’s see how to fix the issue, “sub-process usr bin dpkg returned an error”. With our Server Management Services, Bobcares offers solutions to your queries.

E: Sub-process /usr/bin/dpkg returned an error code

Sub-process usr bin dpkg returned an error

When updating the system or installing or uninstalling a package, we might see this error. The error may result from damaged software installers, broken packages, or other installation-related interruptions. The issue is mostly seen in Ubuntu systems.

Troubleshooting 

There are a number of solutions for this sub-process error. Let’s look into some of them:

1. DPKG database re-config: If a package installation breaks in the middle, the dpkg DB may become corrupt, resulting in this error. However, we can fix it by resetting the dpkg DB. Run the following code:

sudo dpkg --configure -a

2. Force install or fix the broken packages: This method will fix the broken dependencies that may occur due to interruption during downloading or installation. Run any of the below codes:

sudo apt install -f
sudo apt install --fix-broken

3. Corrupted packages removal: We can remove the corrupted packages if the above methods didn’t fix the sub-process error. Run the below command to remove it. We need to replace the “package_name” with the name of the package we want to remove:

sudo apt remove --purge package_name

We can use the below codes to remove the unused and unnecessary packages:

sudo apt clean
sudo apt autoremove

4. Corrupted packages Overwriting: We can also use the method of overwriting the existing package using the below code to fix the sub-process error. We need to replace the “package_name” with the name of the package we want to overwrite:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/package_name

[Need assistance with another issue? We’re available 24/7.]

Conclusion

This article provides 4 troubleshooting tips from our Server Support Team to fix the error “sub-process usr bin dpkg returned an error”.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED