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?
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.