Disable snapd.refresh.service on 16.04 to speed up boot (no snap packages in use)
Solution 1
There's no need to disable it to speed up the boot. This was a mistake on our part, and has been fixed in 2.11, out for updating in the next couple of days. Here is the full change log:
https://github.com/snapcore/snapd/blob/2.11/debian/changelog
Solution 2
According to the systemd wiki, the command to disable a service and prevent it from starting at bootup is:
sudo systemctl disable [foo]
so
sudo systemctl disable snapd.refresh.service
should work in this instance.
Related videos on Youtube
Byte Commander
Ask Ubuntu moderator♦, IT student and DevOps engineer. I love Ubuntu, Python, good music and coffee, although not necessarily in that order. You can easily contact me in the Ask Ubuntu General Room most of the time, or on Discord as @ByteCommander#2800. I'd also love to invite you to my Ubuntu Hideout Discord Server btw. PS: My profile picture is derived from "Wolf Tribals" by user HaskDitex (DeviantArt.com), which is under creative Commons 3.0 License. Currently I'm using the character "Dregg Morriss" from the game "Medieval Cop" by Vasant Jahav ("Gemini Gamer"). It can be found here.
Updated on September 18, 2022Comments
-
Byte Commander over 1 year
I run Ubuntu 16.04 but never installed any snap packages, at least not that I would know of any.
Here are my slowest processes at boot:
$ systemd-analyze blame | head 9.057s snapd.refresh.service 5.058s NetworkManager-wait-online.service 1.126s dev-sdb5.device 822ms storage.mount 804ms data.mount 397ms gpu-manager.service 390ms apt-daily.service 363ms systemd-rfkill.service 334ms systemd-fsck@dev-disk-by\x2duuid-B023\x2d3905.service 251ms accounts-daemon.service
Obviously
snapd.refresh.service
is taking a huge amount of time compared to the rest, especially as I have no need for snaps anyway.How can I disable all snap related stuff to speed my boot time up?
-
Alcuin Arundel almost 8 yearsWould
systemctl disable snapd.refresh.service
work? fedoraproject.org/wiki/… -
Alcuin Arundel almost 8 yearsI just tried it on my system and it seems to work.
snapd.refresh.service
doesn't show up when I runsystemd-analyze blame | head
. -
Byte Commander almost 8 years@AlcuinArundel I ran
systemctl disable snapd.*
as the tab-autocomplete did only mentionsnapd.refresh.timer
,snapd.service
andsnapd.socket
, but notsnapd.refresh.service
. I think I won't need any of them at all anyway. Now the entry disappeared from thesystemd-analyze blame
output. Would you post an answer please? -
WinEunuuchs2Unix about 6 yearsA tip for others reading this Q&A on my own system using
systemctl disable NetworkManager-wait-online.service
(which was taking 10 seconds) reducedsystemd-analyze
from 26 seconds to 16 seconds.
-
-
Byte Commander almost 8 yearsThanks. I ran
systemctl disable snapd.*
instead though as the tab-autocomplete did only mentionsnapd.refresh.timer
,snapd.service
andsnapd.socket
, but notsnapd.refresh.service
. -
arielf almost 7 yearsI'm on 16.04.2 and it is now 2017-07-17.
systemd-analyze blame | head
still showssnapd.refresh.service
as slowest contributor to boot slowness @ 13.702s.snapd
,snap-confine
andubuntu-core-launcher
are all on version 2.26.8. Is this actually fixed in Ubuntu? -
mchid over 6 yearsThis does not answer the question of how to disable all snap related stuff. If it is not in use it shouldn't even be there.