Saturday, August 24, 2013

Sub-Process /usr/bin/dpkg returned an error code (1) [SOLUTION] for Kali Linux / BackTrack / Debian

Written by: Pranshu Bajpai | Find Pranshu on Google+ And LinkedIn

If you have worked in Linux long enough, you might have come across this nasty error while installing new packages. I'm saying it's nasty simply because you'll try all you know to get rid of it but it just won't go away.

Here's what the error looks like when you try to remove the package that is creating the problem:

This next screen shows what happens when you try to install a new package:

The solution to this would be to remove any traces of this package, in this case vsftpd, in two locations:

Location 1: cd /var/lib/dpkg/info

Location 2: cd /var/cache/apt/archives/

Navigate to these paths and remove the vsftpd files, nomatter what the extension of that file.

After removing said files, the problem should resolve, and you should be able to install new packages.

Note: This solution is something that worked for me and should work for others as well, but if it doesn't, let me know in comments below.


  1. This comment has been removed by a blog administrator.

  2. I dont understand
    please explain one by one cause i am newbie

    1. im new one to and i fixeed armitage now i have to fix usr bin dpkg damn....

  3. works perfectly after i tired many other BAD suggestions. thanks!

  4. Good post, works well...

  5. I spent days trying to figure out why I couldn't remove the vsftpd package to reinstall it after it got corrupt when upgrading ubuntu 12.10 to 14.04. Thank you so much for posting this solution!!!

  6. Thank you so much for this solution ! Works well !

  7. thanks it works

  8. Thanks so much, worked for me.