I am running Ubuntu 12.04 and have a "aptd" process running as root (which I understand is correct) but eating 95% CPU (which is definitely not right).
As per one of the answers here How to stop "aptd" from maxing out my CPU? I tried to run dpkg-reconfigure which just added a new process eating 20% CPU for ages until it reported
/usr/sbin/dpkg-reconfigure: menu is broken or not fully installed.
Possibly related the upgrade process recently left a huge apt.log file without getting to the end: A huge apt log file from failed upgrade - what went wrong & how do I fix it?
What do I need do to get my system back into normal operation?
UPDATE #1
This bug report https://bugs.launchpad.net/ubuntu/+source/apt/+bug/665580 suggests I run
sudo apt-get -y update
But it says
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
So I tried
sudo rm /var/lib/apt/lists/lock
sudo apt-get -y update
This has not stopped aptd from maxing the CPU.
Despite warnings not to I have tried to kill the process and it refuses to be killed.
Update #2
This is now slowly cooking my CPU and the fans are on full speed all of the time. Man they are loud (must do something about that next hardware upgrade).
aptd is running with the command line /usr/bin/python /usr/bin/aptd and apparent has used 1d17h CPU Time.
However it has now been joined by apt-get which is running under the command line apt-get -qq -y -d -dist-upgrade. As a result aptd has "dropped" to 85.1MiB Memory with 183.8MiB Virtual Memory used up.
I am looking at restarting or shutting down, if only to save my hardware from cooking.
Update #3
As per ShadowMitia's comments I tried
sudo killall -9 apt-get
sudo kill -9 _pid_
Which killed the naughty processes. Now to figure out what was broken and fix that?
I am going to try restarting to see if it happens again.
Update #4
Okay, so I just restarted.
apt-check got in there right away and shot to about 88% aptd then joined in and climbed rapidly to 100% to 102%.
apt-check is still there but at 40% to 50%.
Looks like I will need to kill those off sooner or later?
Update 5
Apt-check and aptd were still burning away after over 24 hours of CPU time. I killed them off again. Will try upgrading and report back.
sudo killall -9 apt-get
? And then reboot to see what happens. Then you could try again the solutions you've found.top
and then usingsudo kill -9 _pid_
?