Installing snap on Debian


#1

On Debian 9 (Stretch), snap can be installed directly from the command line:

$ sudo apt update
$ sudo apt install snapd

If the sudo command isn’t installed (usually because a root password was provided at install time), you can install snap by first switching to the root account:

$ su root
$ apt update
$ apt install snapd

Snap is currently unavailable on versions of Debian prior to 9.


Installing snapd
#2

Really - - - this is incomplete!
With installation instructions should come instructions for removing snap(d).
This is going to be complicated by the ‘special’ snaps which are not possible to be removed in any kind of ‘regular’ fashion.


#3

could you expand on what you mean by this?


#4

This is going to be complicated by the ‘special’ snaps which are not possible to be removed in any kind of ‘regular’ fashion.

could you expand on what you mean by this?

The LXD dev team has indicated that the ‘snap’ is a special model (prepared upon their request). So to remove this snap first LXD must be removed (its a complicated process) otherwise it is not possible to remove the lxd/snapd environment. This means that doing snap remove and then apt remove followed by purge snapd just doesn’t remove all of the included and created bits.


#5

Probably also worth mentioning (as discussed elsewhere on this forum) that snapd only works on Debian 9 and higher, and not on Debian 8.


#6

That’s funny, as I’ve installed and removed lxd lots of times without having to go through the hoops you’re describing.

In any case, do you seriously think that all that minutia around removing a particular snap is appropriate for a tutorial on how to install snapd?


#7

Of course its not important to mention any possibility of problems. It might detract from the financial viability of the project.

Sorry I disturbed you with the facts from my experience.

PS
In my experience business users want to know if there might be any particular problems in both the installation AND the removal of any particular feature of anything.


#8

I’m sorry you felt that @chipaca’s last post was curt, aggressive, or attacking. I’m sure that wasn’t the intention. Can we step back a moment to recollect ourselves? :slight_smile:

I propose that uninstallation of snapd could be added as a separate document to satisfy those that require more up-front information before jumping in.

With regard to the LXD issue you had with removing the LXD snap, this is probably a bug and should be discussed in a new topic in the snap category so that we can understand what failed to be removed and queue-up fixes to either snapd or the LXD snap to mitigate the problem in the future.