Avoiding snaps in Ubuntu 22.04 (and derivatives)

Hi all, :wave:

I´ve got a question regarding snaps in a new Ubuntu 22.04 installation (also in derivatives).

I have cause to avoid snaps. Don´t like them … but for other reasons that the often cited “they´re slow to open on first run”.
For me the important points are:

  • they don´t work with the firejail sandbox (I wouldn´t give up using firejail for the “sandboxing” features of snaps :blush:)
  • snaps cost me too much of download data as the internal snap update feature cannot be turned off. :angry:

Well, I could (permanently) disable snap packages thus:

sudo systemctl stop snapd.service
sudo systemctl disable snapd.service

but

after a reboot they´d be automatically re-enabled. I´d have to mask the service with

sudo systemctl mask snapd.service

to make it reboot-safe. :wink:

Hmm, in this case I´d avoid unwanted and data-intensive snap updates but any programme installed as snap wouldn´t be available then. :thinking:

I know there are still ways to install firefox, which is installed as a snap in 22.04, as a DEB package but now I found out there´s a bit more than just firefox. :astonished:

Taking distrowatch as my source I looked up the 22.04 package lists of distros that would be candidates for me.

Here are the results from Lubuntu, Ubuntu Mate, Ubuntu (as reference only) and LinuxLite:
(I was looking for “snap:”, including “snapd” itself)

Lubuntu (7 items) - DistroWatch.com: Lubuntu

• snap:bare stable
• snap:core20 stable
• snapd 2.55.3+22.04
• snap:firefox stable/ubuntu-22.04
• snap:gnome-3-38-2004 stable/ubuntu-22.04
• snap:gtk-common-themes stable/ubuntu-22.04
• snap:snapd stable

Ubuntu Mate (10 items): - DistroWatch.com: Ubuntu MATE

• snap:bare stable
• snap:core20 stable
• snapd 2.55.3+22.04
• snap:firefox stable/ubuntu-22.04
• snap:gnome-3-38-2004 stable/ubuntu-22.04
• snap:gtk-common-themes stable/ubuntu-22.04
• snap:snapd-desktop-integration stable/ubuntu-22.04
• snap:snapd stable
• snap:software-boutique stable/ubuntu-22.04
• snap:ubuntu-mate-welcome stable/ubuntu-22.04

Ubuntu (9 items): - DistroWatch.com: Ubuntu

• snap:bare stable
• snap:core20 stable
• snapd 2.55.3+22.04
• snap:firefox stable/ubuntu-22.04
• snap:gnome-3-38-2004 stable/ubuntu-22.04
• snap:gtk-common-themes stable/ubuntu-22.04
• snap:snapd-desktop-integration stable/ubuntu-22.04
• snap:snapd stable
• snap:snap-store stable/ubuntu-22.04

LinuxLite: (0 items) - great :slightly_smiling_face: - DistroWatch.com: Linux Lite

Initially I was of the opinion it was just firefox which had fallen victim to snap. But (taking Lubuntu as an example) … what about the gnome package or the gtk-common-themes?
And in Ubuntu Mate: the software-boutique?

Seems a little bit more is snap-dependent.

I mean: wouldn´t I run into problems if I completely turned off snap by masking the snapd.service? :question: That would be huge then.

What do you think about the problem?

Thanks a lot in advance.

Many greetings
Rosika :slightly_smiling_face:

That could definitely happen, especially if such basic packages, like the ones you mentioned, are snapped.

If this is really the case and snap is so deeply build into Ubuntu, I’m afraid you can do little about it, except you want to dive really deep and modify the Ubuntu base relatively heavily.

Therefore, it’s not impossible, but it would cost a lot of time, effort and stress.

On the other hand, if you think it’s worth the trouble and would consider doing it, it might probably help other people, if you could release a method of getting rid of snap on Ubuntu completely, safely.

As viewable, there are quite a number of posts and articles on this topic. Though, I doubt they are taking the necessary safety measures to guarantee everything is still working after complete removal. Additionally, I would suspect Ubuntu people snappify everything even more with each release version. Therefore, maybe some of the methods worked before, but do not work anymore.

In short, be careful and think about how much trouble you are willing to go into, for the sake of removing snap entirely.

2 Likes

I could not believe that Software Boutique had gone Snap. I hate them too and avoid like the plague.
I use Linux Mint XFCE Edition, they don’t have Snaps at all, though they have FlatPaks which is another resource hungry beast. AppImages are brilliant, easy to use and add to your menu. Ubuntu 22.04 does not support AppImages, so to get around that have to install libfuse2, so that they’ll work. The Canonical ethos is everyone should use their Snap Packages only. I’ve said it before and I’ll say it again.
In years to come Ubuntu will be one giant Snap Package, no longer based on Debian. Meaning you’ll need a 4TB Drive to run it, as let’s face it I cannot see Snap Packages getting better over time, especially with the amount of ways exploits can get added to them. If I’m looking at Ubuntu in VirtualBox? I always get rid of Snaps sudo apt purge snapd Reboot then in Terminal
sudo apt-get remove --purge gnome-software gnome-software-plugin-snap
For a web browser Librewolf or Waterfox I install, as trying to install Deb version of Firefox, it installs Snaps version only.

1 Like

That gives me the horrors.
I think the only way out is to move to a distro that does not use snap.
You cant keep fighting this trend by deleting things.
Can we get together a list of distros that do not use snap?

Mint and Debian for starters

2 Likes

Hi everyone, :wave:

thanks a lot for your replies :heart:.

Uh, uh, not good news overall… :frowning_face:

@Akito:

thank you for the impressive list of links you so kindly provided. :+1:
Hadn´t time so far but I´ll definitively look into them.

That´s what I was afraid of. Thanks for the confirmation.

Perhaps your links might help. But in general I´d rather refrain from modifying the Ubuntu base. I´m surely not up to such refined procedures. :blush:

Oh dear. That doesn´t sound good.

That´s bad news indeed… :face_holding_back_tears:

I´ve been on Lubuntu ever since I switched over to a Linux-based distro. Now it seems I won´t be using any Ubuntu derivative (or Ubuntu itself) in the future…

As I said, I´ll look into the links but from what you´ve said so far … no happy times lying ahead of me. :confounded:

Thanks a lot. :heart:

@clatterfordslim:

Hi Mark,

Yes, that came as a surprise to me as well.

What I´ve found for far is this:
https://discourse.lubuntu.me/t/how-to-install-firefox-non-snap/3222
Theoretically it could be done.
Yet this alone wouldn´t be of any help to me as I would need to get rid of snap and everything which is running as snap altogether … :frowning_face:

Bleak future lying ahead of us it seems…

@nevj:

Thanks.

I guess I´ll have to look for one of those then.

I know Debian is resource friendly. But what about Mint?

I know my CPU can handle stuff alright. It´s my RAM I´m concerned about. I´ve got 4GB of RAM…
… and with Lubuntu I could have the following running at the same time:

  • firefox
  • thunderbird
  • a VM (either Debian or BodhiLinux)

… without running into any performance problems. I guess I could be satisified with that.

Oh, I nearly forgot:
Today I checked my RAM after a cold boot with nothing else running but htop (for measuring RAM) … and the services/daemons started by default of course.
I got a reading of 484 MB RAM.

So basically I´m looking for a Lubuntu replacement with the following characteristics:

  • lightweight (I guess RAM after boot around 500 MB would be o.k.)
  • no snaps (would exclude any Ubuntu derivatives I guess)
  • DEB package management
  • fixed release model

I guess I have to keep looking very thoroughly then.

Many thanks to all of you and many greetings
Rosika :slightly_smiling_face:

P.S.:

Although LinuxLite doesn´t feature any of the snaps of the other distros (mentioned in my post #1) I still found those entries (containing the search word “snap”) in LinuxLite:

• gir1.2-snapd-1:amd64 1.60-0ubuntu1
• libsnapd-glib1:amd64 1.60-0ubuntu1
• libsnappy1v5:amd64 1.1.8-1build3

Even Mint shows two of these in its package list (DistroWatch.com: Linux Mint):

• libsnapd-glib1:amd64 1.58-0ubuntu0.20.04.0
• libsnappy1v5:amd64 1.1.8-1build1

Any ideas what that would mean :question:

P.S.2:

Good idea, Neville.
I just posted a related question in the LinuxLite forum, hoping to get some clues.

1 Like

Its almost like they don’t care what the actual users of their distros think, never mind ASKING them what they like, and what they hate!

3 Likes

Hi Rosika,
snapd requires systemd
tberefore
if you choose a distro that does not use systemd,
they can never go to using snap instead of packages

In the deb family
Debian and Mint use systemd
MX and Devuan avoid systemd

To reduce ram usage
Use a minimal install iso, and add the things you want.
I have debian running ok in an old 32 bit laptop with 4Gb ram
So you dont have to have a special lightweight distro like Lubuntu, you can make one from any distro.

Hope this helps. There are most likely other options
Regards
Neville

2 Likes

Hi Neville, :wave:

thanks for your reply and suggestions.

Ah, I see. Didn´t take that into account . Thanks for letting me know. :+1:

As I´m using Debian 10 in a VM I think I could befriend myself with it, although it was a bit of a pain to install it at the time.
I just looked at bullseye´s package-list on https://distrowatch.com/table.php?distribution=debian&pkglist=true&version=11#pkglist.

snapd 2.49-1+b5 is installed but no entries like this: “snap:”, which would (hopefully) indicate no programmes running as snap per default are installed… :thinking:

Uh, uh… :confused:
Not sure how I would accomplish such a difficult task. I´ll have to do some research on the matter first.

Well, it sounds good, but - as I said - I´ve no idea where to look.
Perhaps I start with searching for a Debian minimal install…?

BTW:

I just checked my running system Lubuntu 20.04 LTS:

dglob snap

libsnapd-glib1:amd64
libsnapd-qt1:amd64
libsnappy1v5:amd64
libsnappy1v5:i386
plasma-discover-backend-snap:amd64
snapd:amd64

I see I have the packages libsnappy and even plasma-discover-backend-snap already but they won´t hurt, as:

 systemctl status snapd
● snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Fri 2022-07-29 14:42:23 CEST; 4min 36s ago
TriggeredBy: ● snapd.socket
    Process: 18961 ExecStart=/usr/lib/snapd/snapd (code=exited, status=42)
   Main PID: 18961 (code=exited, status=42)

Jul 29 14:42:17 rosika-10159 snapd[18961]: overlord.go:263: Acquiring state lock file
Jul 29 14:42:17 rosika-10159 snapd[18961]: overlord.go:268: Acquired state lock file
Jul 29 14:42:17 rosika-10159 snapd[18961]: daemon.go:247: started snapd/2.55.5+20.04 (series 1>
Jul 29 14:42:18 rosika-10159 snapd[18961]: daemon.go:340: adjusting startup timeout by 30s (pe>
Jul 29 14:42:18 rosika-10159 systemd[1]: Started Snap Daemon.
Jul 29 14:42:23 rosika-10159 snapd[18961]: daemon.go:521: gracefully waiting for running hooks
Jul 29 14:42:23 rosika-10159 snapd[18961]: daemon.go:523: done waiting for running hooks
Jul 29 14:42:23 rosika-10159 snapd[18961]: overlord.go:504: Released state lock file
Jul 29 14:42:23 rosika-10159 snapd[18961]: daemon stop requested to wait for socket activation
Jul 29 14:42:23 rosika-10159 systemd[1]: snapd.service: Succeeded.

and

snap list --all
Es sind noch keine Snaps installiert. Versuchen Sie »snap install hello-world«.

i.e.: no snaps installed.

So no problem there. :wink:

Thanks so much, Neville. :heart:

Many greetings from Rosika :slightly_smiling_face:

UPDATE:

In the meantime I´ve received an answer to my query on the Lubuntu forums by Lubuntu Council Member guiverc. It can be found here:

I guess I have to read it more than once …
… still not sure what to make of it. :thinking:

Many greetings from Rosika :slightly_smiling_face:

I would try the Devuan minimal install iso.
Devuan is a bit nicer to install than Debian, but it is almost identical to Debian when using it.
What you get with a minimal install is just a command line prompt… no window system at all, and only enough packages to run.
You add everything you want, starting with your chosen DTE.
It is quite easy.
You have the ideal setup to try it, without discarding your Lubuntu.

Hi Neville, :wave:

thanks a lot for the suggestion.

If I remember correctly we already discussed taking into consideration Devuan for a potential candidate (another thread).

I just took a look at DistroWatch.com: Devuan GNU+Linux and immediately hit the “issue” with me:

4.0.0 chimaera is flagged as a “Semi-Rolling” release model. The last fixed one was 2.1. ascii.

I really need a fixed release model; cannot afford something else which is more data-consuming. So sorry. :confused:

Many greetings from Rosika :slightly_smiling_face:

However, if you switch from “Fixed” to “Fixed (LTS)”, suddenly there are only 7 results…

I did not know that, sorry
I think that might apply to MX too.
Back to Debian I suppose

1 Like

Thanks all, :heart:

@Akito:

Great, thanks for the link. I just tried it.
Interesting (for me) that this would narrow down my choice to Debian and Linux Lite then.:wink:

@nevj:

No need to be sorry, Neville. I´m grateful for any input. Thanks.

Yes, seems that way.

BTW:

Alan Pope´s blog seems to provide some interesting insights…

Many greetings
Rosika :slightly_smiling_face:

1 Like

Not sure. Ubuntu has millions of users world wide. It would be astonishing, if none of them has yet created a reliable method of removing Snap or even made a derivative that focuses on having everything Ubuntu has, except Snap.

I also would recommend trying out a backup of your system inside a VM and then run the Snap removal methods from the links I posted earlier. Then you can see for yourself, if it actually breaks something or if we were just too pessimistic about it working.

Since changing a distribution is a drastic measure – yes, even changing from Debian to Devuan or from Ubuntu to Lubuntu can be drastic in various ways – I would recommend first exhausting all simpler & easier solutions. Only if those do not work, at all, then I would start thinking about switching the distribution altogether.

2 Likes

Thanks @Akito,

So far I´ve read the first three links you provided. I´ll keep on reading. :+1:

Hmm, sounds interesting.

But:

As I have nothing installed snap-wise on my current Lubuntu wouldn´t it make more sense to get hold of a Lubuntu 22.04 ISO, install it in a VM, and then try the discussed methods?

Quite right. I´ve gotten pretty accustomed to using Lubuntu since mid 2016… :wink:.
Therefore:

seems very reasonable indeed. :+1:
I´ll keep reading on. Still have some links of yours left.

Many thanks and many greetings
Rosika :slightly_smiling_face:

Removing snap is one thing
You then have to try and find a way to install needed packages that are only available as snaps.

I think, in principle, @Akito 's argument for staying with Lubuntu is correct, It just might come down to more work than changing distro.

1 Like

This is the problem, which is why I use Mint. Okay so their software is a little behind, that is what AppImages are for. Flatpaks are just as space hungry as Snaps are, but they are more reliable than Snaps. I’ve got the latest Kdenlive 22.04.3 build in an AppImage, written by KDE running flawlessly. The point is, is as so many different Linux Environments and communities all competing for the same goal. YouTube channels that cover Linux advertising Snaps, as in you can this or that now as either a Flatpak or Snap. Wish they would make their stuff as an AppImage too, but Ubuntu 22.04 has taken that option to run a AppImage away. Again having to tinker with your system to run AppImages, just a matter of installing libfuse2 as I mentioned earlier.

Every Linux Distribution or OS can run Snaps, it’s down to the author of the OS if they want to include them or not. I’d personally would leave them out, leave it to the user to decide if they need them or not??
Every Ubuntu family niche OS Xubuntu, Kubuntu, all of them with buntu on the end, seem to have to follow what Canonical says, to stay in the Ubuntu family of Distros. It is wrong in my opinion, as a lot of the other Buntu’s are actually better than the main Ubuntu itself. Like you say we cannot keep deleting or uninstalling Snaps because we don’t want to use it. There has to be a line drawn somewhere? All developers get their heads together and give us the users of their OS, Environment, Distribution, whatever you wanna call it? More control. I was disgusted with Firefox being turned into a Snap, but it opened my eyes to Librewolf and Waterfox, which I have in Ubuntu 22.04 in VirtualBox, that is the only place Ubuntu 22.04 will get seen on my hardware.

If Canonical had done the right thing in the first place, of giving us choice of whether we want to use their Snap Packages or not, then yes I would use Ubuntu. They just blatantly handed us Snaps only, yes you can install Deb files still, but I would of liked to of seen a choice in the matter. Click here if you would like Snapd installed option on the install screen for instance? At least that would have given the user choice.

Distros without Snaps or at least give you the option.
Peppermint 11 Debian Bullseye, gives the user bare bones approach, meaning you install whatever you want, including Flatpaks, but not installed by default until whether you the user want them or not. Can be installed in the Pep Hub from a single left click of your mouse button.

Linux Mint comes with Flatpaks only approach, as they saw the hacked Malware exploit, that very easily got into a Snap Package and so Mint team said no to Snaps. Yes the software is a little behind, but easily install AppImages.

MXLinux Debian KDE and Xfce A very polished Debian experience indeed, with lots of MX-tools. Being able to make your own ISO of your installed environment, to install on other machines or give to a friend or family member for them to install on their hardware.

Nix OS Choose your own environment, don’t have to rely on what normal developers give you, make it your own, installing from a script instead of a GUI.

Debian itself, build it yourself

NixOS has still problems like all other Linux distributions, like library incompatibilities, etc. However, since you can automate everything reproducibly, it’s much easier to reliably mitigate those issues.

1 Like

I like both of the above MX and Mint. Unfortunately @Rosika does not want to consider MX because it is semi-rolling release. Similarly Devuan is semi-rolling.

I would also like to repeat the argument I made above. If you really want to ensure that a distro will never decide to force snap onto you, choose a non-systemd distro. Snapd requires systemd to run. There is no way that something like Devuan or Void can use snap.

I would also like to ask how do snap, flatpak, and appimage comply with open source requirements. If I want to see the source code for a deb package, that is easy, I just access the src code repository.
How do I access the src code for a snap pack ( or flatpak or appimage) ? I am supposed to be able to access src for all opensource software. Where is it?

My feeling about Ubuntu is they are using snap as a method of avoiding responsibility for ensuring compatability of packages.
Most distros make some effort to ensure the packages in each release work together. Some, like Arch and Gentoo, just pass the issue on to the user, but Ubuntu seem to be trying to solve rhe issue by containerizing everything.

Just my ideas. I dint have the solution
Regards
Neville

1 Like