Does the snapd daemon automatically update itself?

I was all set to manually patch it from “2.54.3+20.04.1ubuntu0.1” to “2.54.3+20.04.1ubuntu0.2” and then discovered I no longer needed to do so… Leading me to suspect it updates itself?

Yes and no, so the answer is it depends. Snapd snap is built in such way that it is possible to run it on systems as old as Ubuntu 14.04. The binaries are configured at build time to be compatible with Debian/Ubuntu distros. Thus on Ubuntu and Debian, snapd employes a reexecution mechanism, such that if you run a binary from the distro package, it will reexecute itself into a corresponding binary in the snapd (or core) snap, if the snap is of newer version than what you have locally. You can opt out of this mechanism by setting SNAPD_REEXEC=0 in your environment. The advantage is though, that you are able to have a newer version of snapd than what your distro provides as the snapd/core snaps are updated like any other snap would be.

Ideally this mechanism would be extended for other distros, such as Arch, Fedora, openSUSE, Manjaro. AFAIU the only technical obstacle is teaching one of the components of the stack (snap-confine specifically) how to handle such scenario. Howeer, other distros may have also have various concerns such as trusting binaries coming from 3rd party, rather than from their own repositories.

1 Like

Thanks! I appreciate the help.