Ubuntu snapd package versus snapcraft snapd

How does the native Ubuntu deb snapd package compare to the snapd from snapcraft?

Why would I need to snap install snapd? The system works fine without it.

In Ubuntu the deb and snap version should be roughly identical, the deb ships some environment bits that the snap can not put in place (integration of snaps with the desktop, the shell environment, apprmor profiles etc). On recent Ubuntu installations (18.04, 20.04) the deb actually just serves as a jump-start to re-execute the binary in the snap and both get updated in sync. In older Ubuntu installs the deb might be used by default, without doing the re-exec. On distros like debian where it is a lot harder to do Stable Release Updates, installing the snapd snap (along with the core18 or core20 snap) will actually allow you to use a newer snapd due to the faster turnaround time a snap has over a deb.

On systems like Ubuntu Core where you have no support for deb packages (or apt) at all, the snapd snap is used exclusively.

Using the snapd snap in general gives you a way higher flexibility that you can not have with the deb (for example switching to a faster moving snap channel with the snapd snap allows you to test upcoming changes you are waiting for)

Thanks for the explanation.

When you say: “… jump-start to re-execute the binary in the snap…” , how does that actually work? When I look at the snapd process I see that it is executed from /usr/lib/snapd/snapd. That is also the case on the systems that have the snapd snap installed.

it will check the version, if the snapd in the snap is not newer, the one from the deb will be used:

Feb 10 10:27:58 anubis snapd[1928]: daemon.go:347: started snapd/2.48.3 (series 16; classic) ubuntu/16.04 (amd64) linux/4.15.0-133-generic.
Feb 10 10:27:58 anubis snapd[1928]: daemon.go:440: adjusting startup timeout by 5m20s (pessimistic estimate of 30s plus 5s per snap)
...
$  snap version
snap    2.48.3
snapd   2.48.3
series  16
ubuntu  16.04
kernel  4.15.0-133-generic
$ sudo snap refresh snapd --edge
$ journalctl -u snapd|tail -5
Feb 15 14:16:55 anubis snapd[21700]: patch.go:64: Patching system state level 6 to sublevel 3...
Feb 15 14:16:55 anubis snapd[21700]: daemon.go:347: started snapd/2.49+git344.gcc398c1 (series 16; classic) ubuntu/16.04 (amd64) linux/4.15.0-133-generic.
Feb 15 14:16:55 anubis snapd[21700]: daemon.go:440: adjusting startup timeout by 5m25s (pessimistic estimate of 30s plus 5s per snap)
Feb 15 14:18:03 anubis systemd[1]: Started Snap Daemon.
Feb 15 14:18:07 anubis snapd[21700]: storehelpers.go:551: cannot refresh snap "snapd": snap has no updates available
$ snap version
snap    2.49+git344.gcc398c1
snapd   2.49+git344.gcc398c1
series  16
ubuntu  16.04
kernel  4.15.0-133-generic
$

Ah, thanks. That explains a lot.