I am running Ubuntu 16.04 and when trying to unpack linux-headers-4.4.0-66-generic apt hangs indefinitely. I terminated the apt process, removed the stale lock files, and ran:
sudo apt-get clean sudo dpkg --configure -a
and the result is:
dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-headers-generic (= 188.8.131.52.70); however: Version of linux-headers-generic on system is 184.108.40.206.68. dpkg: error processing package linux-generic (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-generic
I then ran:
sudo apt-get update sudo apt-get ugrade
with the following result:
... You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-generic : Depends: linux-headers-generic (= 220.127.116.11.70) but 18.104.22.168.68 is installed E: Unmet dependencies. Try using -f.
Running apt-get -f install starts the cycle over again and I can't get these issues with apt hanging and linux-generic installing properly.