Score:1

What is the reason that snapd is installed via apt and snap in Ubuntu?

cn flag

I see that snapd on Ubuntu 22.04 is installed via apt, but snap info also suggests that snapd is also installed as a snap package. Is there a good reason to keep it that way?

Gilles Quenot avatar
tn flag
When you install snap by apt, you have snap/snapd. It's not something different
muru avatar
us flag
How do you even install snapd using snap?
Bruni avatar
cn flag
..and whats your problem with donkeys? ;-) Just kidding. As @muru implied, if you have no snapd, you can not use snap to install snapd.
cn flag
The apt-installed snapd is slightly older. I was a bit surprised to discover that the apt package hasn't subsequently installed snapd via snap though. That'd make shipping snapd updates easier just like any other snap package. That's why I was wondering if there's any downside to installing snapd via snap.
kyrofa avatar
cn flag
Hey folks, this is a legit question. It is not opinion-based, but a common source of confusion about how snapd works.
Score:5
cn flag

You actually need both.

You must have the snapd Debian package in order to install anything as a snap. You're right though: snapd is also distributed as a snap. However, it's never a snap you'll need to install yourself-- it'll get installed automatically. It's done this way so that snapd can update itself automatically using the typical snap mechanism instead of relying on you to update the Debian package. It also means you can try out different snapd channels to preview new features, and so on. Ultimately the snapd Debian package is a bootstrap that sets up the host to run snaps, and then re-executes the snapd shipped within the snapd snap.

The snapd Debian package used to use the core snap for this same purpose. If you don't see the snapd snap installed, it means your apt-installed snapd is re-executing into the core snap instead.

cn flag
I don't see the snapd snap installed on any of my systems. The snapd from the stable channel is a bit newer than the one I have, which is installed via apt. So it seems that the snapd snap isn't installed by default but I could install it if I wanted to.
kyrofa avatar
cn flag
That probably means you have an older snapd. In that case, it's using the `core` snap for the same purpose. The `snapd` snap type is a somewhat-recent invention.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.