Before removing any files, make backups.
Code:
cp -arf /var/lib/dpkg ${HOME}/var-lib-dpkg.backup
Don't forget to remove the lock files.
/var/lib/dpkg/lock
If problems persist, there may be others you need to remove. Try the above first, and only move on if it doesn't help.
/var/lib/apt/lists/lock
/var/cache/apt/archives/lock
Now run the following after deleting each of the above files:
Code:
dpkg --configure -a
After you have done this, you may want to retry running the process you were running at the time dpkg had been interrupted (upgrade, dist-upgrade, etc.) to make sure there aren't more packages that need to be installed.