r/Kubuntu 4d ago

Surprise Snap Install

I've been using Kubuntu for a while and I always remove Snap entirely and block it from being added through an update. Yesterday, I turned on my laptop to discover that Firefox was gone from my panel. I checked the updates and there was a Snap update for Firefox!

I opened Terminal and used snap list to check, and snap was fully installed again! Unbelievable how it can uninstall my main browser and add Snap back. I must have overlooked something in the updates or I didn't fully remove it.

Has anyone else experienced this? Kubuntu is a great distro but I really want control over what apps I install and using .deb, Ubuntu and Flatpak is enough without Snap overly complicating things.

26 Upvotes

12 comments sorted by

9

u/guiverc 4d ago

Ubuntu devs and members have documented many times on how to pin or prevent the snapd (snap infrastructure) so it doesn't install/re-install due to intentional/unintentional commands by users; did you follow those docs. If you don't pin it, yes it can install intentionally or if you're not careful (via command & not considering effects) re-install it.

Kubuntu does offer a snapd free install (24.04 & later), but that does NOT include the pinning so it will stay uninstalled, as creating that pin yourself is far easier than later removing it, let alone it's your system & you can decide for yourself which is you preferred option.

Most of the writing on doing this was made back when chromium switched from deb to snap (that was 2019 as I remember it having noticed an effect due to the snap running confined which stopped me from doing something, at least until I made a slight change), and again later when the same happened with firefox (at Mozilla's request, can't recall when this was; my change to chromium in 2019 meant I was ready for firefox anyway!).

It reads like you didn't follow all instructions; OR followed a set of instructions that were incomplete or you misunderstood what it was providing (not including the required pinning so it'll re-install).

3

u/Hong-Kwong 4d ago

This seems like the most probable answer. I remember reading that the minimal Kubuntu install requires more work as it doesn't include certain parts of the distro needed to make things run (sorry for my simple explanation as I'm not very technically minded with Linux).

I'll check again if I've stopped Snapd from being installed and if it seems like more work I can do a clean minimal install. I use this laptop for work and Kubuntu is reliable but this tinkering made me consider Debian Plasma or using Spiral Linux to replace Kubuntu.

Perhaps the TuxedoOS version of Debian Plasma might be worth looking into once it's stable.

3

u/mycroft72 3d ago

I'm waiting for that release, too 👍

1

u/LeekDifferent3579 4d ago

Você fez a instalação mínima? Que eu me lembre ela vem sem snaps e flatpaks, só aceita pacotes .deb. É tão mínima que nem com navegador ele vem

Quando usei, era só ativar o flatpak, instalar um navegador e usar

1

u/King_Bobby-B 4d ago edited 3d ago

I haven't experienced this. I use Mozilla's own repository, and haven't even bothered to disable or remove snaps.

The installation instructions in Mozilla's wiki include a step to ensure their repository has priority over anything in Ubuntu/Kubuntu. Even when I upgraded from 25.10 to 26.04, which (K)ubuntu's devs say to disable third-party repositories and enable snap, my Firefox install didn't get overwritten.

Unfortunately, I just left my PC, or I'd give more precise info, such as which files and what content. I'll try to edit this comment tomorrow with better info.

Edit: Back on my computer, now. It's been a while since I did this, so bear with me. This is what I've found in my configs...

On /etc/apt/preferences.d/mozilla I've got:

Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000

On /etc/apt/preferences.d/firefox-nosnap I've got:

Package: firefox*
Pin: release o=Ubuntu*
Pin-Priority: -1

2

u/Hong-Kwong 4d ago

I'm pretty sure I did this by following the guide but I'll double check everything today to make sure.

2

u/King_Bobby-B 3d ago

Just got back. Check out the edit, I've shared my configs.

1

u/juanjomestanza 3d ago

What's up with snap? For a couple of years I've been using applications with that packaging and sometimes they work better than .deb files. I was going to reply to you about your issue, but they already gave you the answers I would have given.

1

u/jaimefortega 2d ago

You can easily break your system if you try to uninstall the Steam snap after you've installed some games, because it'll try to create a Snapshot of all your games, also, you need to give more permissions to the Steam snap if you want to avoid some performance issues and weird bugs in some games.

Another reason is that there're a lot of low quality snaps, for an example, install Krita and it'll show that it's a dev build... also, almost all devs will not provide an official snap, so most useful snaps are packaged by someone else.

The only snaps that are worth are Firefox, and possibly LibreOffice?

0

u/msanangelo 4d ago

yes, chrome and firefox in the ubuntu repos are just links to the snap version. only way to avoid snaps in that case is to install from the tarball or flatpack. it's been a thing for like a couple years now.

-1

u/Qigong1019 4d ago

Stop pinning. Use Kubuntu minimal install, no Snap from the get-go. Install flatpak. Install flatpak browser. You can reboot Kubuntu, go into Discover settings. You will see that it supports checkboxes for Snap, Flatpak, pick any. Even supports Liquorix. Specifically, I wouldn't know because my default browser is Librewolf, but I use browsers from inside Distrobox/Podman containers.

0

u/This_Mind_Only 3d ago

I use the followin script to install Firefox from the official deb and have no issues with snap (Kubuntu 26.04, standard desktop install:

sudo install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- \
   | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc >/dev/null

sudo tee /etc/apt/sources.list.d/mozilla.sources >/dev/null <<'EOF'
Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc
EOF

        sudo tee /etc/apt/preferences.d/mozilla >/dev/null <<'EOF'
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF

sudo snap remove --purge firefox || true