How to disable snapd

Snapd is not actually used, but it occupies system resources. How to disable it without uninstalling it

Filesystem Size Used Avail Use% Mounted on
udev 182M 0 182M 0% /dev
tmpfs 45M 1.2M 44M 3% /run
/dev/sda2 98G 2.9G 91G 4% /
tmpfs 225M 0 225M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 225M 0 225M 0% /sys/fs/cgroup
/dev/loop1 56M 56M 0 100% /snap/core18/1944
/dev/loop0 70M 70M 0 100% /snap/lxd/19188
/dev/loop4 33M 33M 0 100% /snap/snapd/12159
/dev/loop2 56M 56M 0 100% /snap/core18/2074
/dev/loop5 33M 33M 0 100% /snap/snapd/12398
tmpfs 45M 0 45M 0% /run/user/1000

snapd is typically completely inactive if it is not actively updating, installing removing or connecting things, it usually does not occupy any system resouces and gets activated via a systemd socket when needed …

you can indeed at all time disable that bit as well with the systemctl command, like any other systemd managed service …

Thank you, is it enough to disable these services?

systemctl status snapd.
snapd.apparmor.service snapd.recovery-chooser-trigger.service snapd.snap-repair.timer
snapd.autoimport.service snapd.seeded.service snapd.socket
snapd.core-fixup.service snapd.service snapd.system-shutdown.service
snapd.failure.service snapd.snap-repair.service

only snapd.service and snapd.socket should be needed, the others are not anything that runs constantly at all …

Thank you very much. To be safe, I disable them all

i hope you noted down their state before disabling in case you want to turn them back to their defaults, some of them are only for Ubuntu Core and might cause some chaos when enabling them on a classic installation … (i assume you planned to occasionally re-enable snapd if you do not want to simply uninstall it)