I've tried to get around this first by doing:
rm /var/lib/dpkg/lock
rm /var/cache/apt/archives/lock
dpkg --configure -a
apt-get install -f
But what I installed previously is now held in an inconsistent state. I can't be apt-get purge'd and it can't be properly installed. So I:
dpkg --remove --force-remove-reinstreq <packagename>
And apt-get install something else instead. But every time it gets to upacking it locks up again.
I've tried to get around this first by doing: apt/archives/ lock
rm /var/lib/dpkg/lock
rm /var/cache/
dpkg --configure -a
apt-get install -f
But what I installed previously is now held in an inconsistent state. I can't be apt-get purge'd and it can't be properly installed. So I: remove- reinstreq <packagename>
dpkg --remove --force-
And apt-get install something else instead. But every time it gets to upacking it locks up again.