Packagekitd what it is doing?

The proc /usr/libexec/packagekitd is often showing up in top with high CPU utilization and actually one of the highest TIME sum value in ps: 1:10, phoc has 1:58 to compare. What it is duty?

Search engine is your friend in this: See this and this. The more specific question would be, “what does it do in PureOS, as in, does it [your observation] indicate something about flatpak usage or PureOSstore (for instance)”.

I was searching the forum here without any good hits for the word “packagekitd”. Thanks for your pointers to a general description of this beast. The question remains: why this has to run on my L5 consuming the battery? And: I haven’t seen this before. Should I just disable it with the systemctl?

1 Like

No, because it handle your installed packages and check for updates.
Maybe you can try to hack it, or toss an update by purism to just run if you have plugged in your power to charge your battery.

Edit: If you disable it… i think you won’t see update till you manual tossed it through interface or command line. However, give it a shot to collect and share experience. :smiley:

PackageKit is used by PureOS Store. If you’re not using PureOS Store nor any other GUI frontend based on it (but, say, apt instead), you can simply disable it.

Thanks. I do not use the PureOS store, only apt update && apt full-upgrade. So I will disable it.

I did:

root@pureos:/home/purism# systemctl stop packagekit
root@pureos:/home/purism# systemctl disable packagekit
root@pureos:/home/purism# systemctl status packagekit
● packagekit.service - PackageKit Daemon
     Loaded: loaded (/lib/systemd/system/packagekit.service; static)
     Active: inactive (dead)

but after a short while the beast is ‘active’ again :frowning:

root@pureos:~# dpkg-divert --divert /etc/PackageKit/20packagekit.distrib --rename  /etc/apt/apt.conf.d/20packagekit   
root@pureos:~# dpkg-divert --list | grep -i packagekit
local diversion of /etc/apt/apt.conf.d/20packagekit to /etc/PackageKit/20packagekit.distrib
root@pureos:~# ls -l /etc/systemd/system/packagekit.service 
lrwxrwxrwx 1 root root 9 10. Mär 2021  /etc/systemd/system/packagekit.service -> /dev/null

This did it for me (so far). If it is started again there might be other software in your system triggering a start via dbus and you might need to disable that, too:

purism@pureos:~$ ls -l /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service
-rw-r--r-- 1 root root 123 22. Feb 2022  /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service

Generally it’s enough to copy gnome-software files from /etc/xdg/autostart to ~/.config/xdg/autostart and add X-GNOME-Autostart-enabled=false line to them to stop PureOS Store from launching at boot and requesting PackageKit to start with it.


There are around 25 files and none has to do with the packagekitd:

purism@pureos:~$ grep Exec /etc/xdg/autostart/org.gnome* | grep -i pack

Yes but is there one called gnome-software* ?

I stopped it at 12:40 and it was restarted 12:56 by:

# grep package /var/log/syslog | tail -3
Jun 12 12:40:39 pureos systemd[1]: packagekit.service: Succeeded.
Jun 12 12:40:39 pureos systemd[1]: packagekit.service: Consumed 2min 23.145s CPU time.
Jun 12 12:56:18 pureos dbus-daemon[517]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.57' (uid=1000 pid=1553 comm="/usr/bin/gnome-software --gapplication-service ")

without any reboot.

I think it is this issue. It happens on many GNOME distributions. For sure on my Fedora systems.

Just to make sure, I have had to move the file /etc/xdg/autostart/gnome-software-service.desktop to ~/.config/xdg/autostart/gnome-software-service.desktop and now it’s fine. Thanks for you trick.

copy, not move. By convention (properly placed) application configuration files under the user home directory override default application configuration in /etc

1 Like

Back when I was stuck using Redhat based systems at work, nautilus was always spontaneously getting into a state where it used 100% CPU. This really annoyed me since I don’t use file managers. My solution was to install debian myself and only install a window manager instead of a desktop.

I also despise all those apps that insist on constantly scanning for images, audio, and video files

I copied the file back to /etc/… and removed the line about autostart in the copied file at its original place. Then I rebooted and the proc gnome-software was running:

purism@pureos:~$ diff ~/.config/xdg/autostart/gnome-software-service.desktop /etc/xdg/autostart/gnome-software-service.desktop
< # see:
< X-GNOME-Autostart-enabled=false
purism@pureos:~$ ps ax | grep gnome-soft
   1613 tty7     Sl+    0:11 /usr/bin/gnome-software --gapplication-service

You forgot about /etc/xdg/autostart/org.gnome.Software.desktop.

I have no such file there:

root@pureos:/home/purism# ls -l /etc/xdg/autostart | grep org.gnome | wc -l
root@pureos:/home/purism# ls -l /etc/xdg/autostart | grep org.gnome.So | wc -l

Hmm, maybe you have to add Hidden=true as well. It’s been a long time since I configured this on my phone :stuck_out_tongue: