禁用16.04上的snapd.refresh.service以加速启动(没有使用快照包)

我运行Ubuntu 16.04但从未安装任何快照包,至少不是我知道的任何。

这是我启动时最慢的进程:

$ 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 

显然snapd.refresh.service与其他人相比花费了大量的时间,特别是因为我无需使用快照。

如何禁用所有与快照相关的内容以加快启动时间?

没有必要禁用它来加速启动。 这是我们的一个错误,并已在2.11中修复,在接下来的几天内更新。 这是完整的更改日志:

https://github.com/snapcore/snapd/blob/2.11/debian/changelog

根据systemd wiki ,禁用服务并阻止它在启动时启动的命令是:

 sudo systemctl disable [foo] 

所以

 sudo systemctl disable snapd.refresh.service 

应该在这种情况下工作。