1

I (almost) never want to install snaps, and if I do by mistake, almost always end up uninstalling and reinstalling a proper version.

Not being able to turn pdftk in /tmp/ or jupyter over a network share (the latter also installs loads of duplicate python) is never going to work for me. In work I could probably completely disable snaps, but at home there are a few things I might want.

I'm running 18.04 at home and 20.04 in work, so would appreciate answers for both. I'm getting quicker at realising what's wrong when I install something and get unhelpful errors, but the installation, uninstallation, and reinstallation all wastes time.

Software center doesn't say (clearly) if it's installing a snap (tested with jupyter on 18.04), neither seemingly does apt (tested with pdftk on 18.04 and 20.04).

Is there anything I can do to interrupt the snap installer or warn when it's called?

Chris H
  • 321
  • 4
  • 11
  • Easy way to avoid wasting time: Scroll down to the Details section; read the Source line: If the source is snapcraft.io, it's a snap. If the source is bionic-* or focal-*, it's a deb. – user535733 Jul 13 '20 at 14:05
  • @user535733 That's true; I hadn't noticed it. It just happens to fall out of the bottom of the window, when at the top in 72 point red is more what I'm looking for (or an "Are you sure?" of course) – Chris H Jul 13 '20 at 20:15

1 Answers1

2

In both versions of Ubuntu, you can remove snap support. That way, you never can install snaps by accident. You do not need to continue reading if you remove snap in the first place.

In Ubuntu 18.04, you never can inadvertently install snap when using apt on the command line. This situation is changing with Ubuntu 20.04, where at least one package, chromium-browser will automatically revert to installing the snap even if you use apt.

With "Software" you get different versions of the same app, the snap version being listed first. So there, one has to be careful what version to select. That, however, can be overcome by removing gnome-software-plugin-snap. That way, software will not offer snaps. In Ubuntu 20.04, it is a bit more complicates. By default, it comes with a snap version of software, called "Snap store". You could remove the Snap store (sudo snap remove snap-store) and install the regular Gnome software instead: sudo apt install gnome-software.

Anyway, if you want exceptionally to install a snap and leave the system as-is, just use apt on the terminal, or be a little careful selecting the software you want to install. Forewarned is forearmed.

On a more advanced level, you could probably replace the snap binary by a wrapper script to include a warning that it will be invoked, if you really wished so.

vanadium
  • 88,010
  • It was Jupyter on my home (18.04) machine that finally prompted me to ask - Software had exactly one hit and that turned out to be a snap, but I want snap support in Software for games etc. (and the ability to browse/search in general) – Chris H Jul 13 '20 at 10:35
  • "I want Snaps for X, but I don't want Snaps for Y" is well beyond any capability built into Ubuntu Software (or any Ubuntu package managers). Ubuntu Software has no way to comprehend your categories or judge your intent. It is open-source, so you are free to hack your own variation, and to share it. Note that Debian's software categories don't exactly match Snap's software categories. – user535733 Jul 13 '20 at 20:28