I’m sorry if I missed the answer to this elsewhere…
Upon installation, Focal has snapd installed as both a deb and a snap. The snap cannot be removed.
After upgrading Bionic to Focal, the snapd deb is upgraded but the snapd snap is not installed.
What’s the purpose of the snapd snap and should it be installed on an upgraded system?
Edited to add: I don’t have a Reply button in this thread for some reason so I’m editing this post.
I see a snapd snap on the following installations of Focal Server:
- Physical system installed with Subiquity
- LXD container from the ubuntu: remote
- VPS on Google Compute Engine
- VPS on Oracle Cloud
I don’t see a snapd snap on:
- Physical system upgraded from Bionic originally installed with the Legacy installer
- VPS on Amazon EC2
Edited again to add:
In case it’s relevant the Bionic system already had core18 installed before the upgrade to Focal.
Edited once again to add:
Thanks for following up with the explanation. It sounds like it would be good practice for administrators to add the snapd snap to upgraded systems that don’t have it.
The deb is the primary delivery mechanism for snapd. On a normal server or desktop install I would not expect the snapd snap installed. What install media did you use?
Thanks for the updated message.
In my reply, I forgot how Focal started pre-seeding snaps that were core18 based. Previously snaps would depend on the core snap, which had snapd inside. With core18, snapd is broken out. I have an open question out about whether the snapd package would still be needed in this case.
The following is from @ijohnson, I appreciate him reaching out to clarify the situation:
The root reason for this behavior is that snapd the daemon re-executes itself to use the newest available version of itself, whether that is snapd from the debian package, snapd from the core snap, or snapd from the snapd snap. As such, you will always have the snapd debian package installed, but you will also have snapd the daemon provided from either the core snap or the snapd snap, depending on which is installed first.
We (snapd team) are in the process of slowly transitioning from folks getting snapd the daemon from the core snap to folks getting snapd the daemon from the snapd snap as that enables us to deliver a better experience more quickly and reduces some problems with ubuntu core reboots that probably aren’t relevant to your use case. As such, in most new installs of bionic and all new installs of focal, the snapd snap is seeded into the system and since that is the source of snapd, the snapd snap cannot be removed unless snapd is entirely removed from the system via
apt remove --purge snapd.
What is happening in the bionic case is that you have a clean install of bionic which does not seed the snapd snap, and instead seeds the core snap, and when the upgrade is performed the snapd upgrade logic will not add the snapd snap automatically to a system that already has the core snap, so your system keeps the core snap it had from bionic instead.
Hopefully this helps clarify things for you and why you see the different sources of snapd showing up in different circumstances.