How to avoid PackageKit consuming lots of CPU and RAM on Kubuntu 14.04

After upgrading my laptop from Kubuntu 12.04 LTS to 14.04 LTS, I noticed that the laptop runs hotter than usual.

Upon investigating further, I found that PackageKit was the process that was consuming lots of CPU and memory.

For example, here is a sample output from htop, showing packagekitd maxing out one core, and eating up almost a quarter of the laptop's RAM:

PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command                                                            
20   0 2591M 1767M 1345M S 99.7 22.5  1:42.95 /usr/lib/packagekit/packagekitd

I searched and found several people reporting similar issues on various platforms, not just Ubuntu nor just KDE. But there was no clear solution.

My workaround was to uninstall PackageKit and whatever depended on it. In this case it is apper:

sudo aptitude purge apper packagekit-backend-aptcc packagekit-backend-apt packagekit-tools packagekit

But that would leave me without a mechanism for notifying me of security updates. To solve this, I installed apticron:

sudo aptitude install apticron

Note that apticron requires that your laptop is able to send emails to the internet.

Contents: 

Tags: