4

I don't hate snap as much as some people but I do usually prefer not to use it so it's really annoying when I: apt install and it just installs a snap without asking, is there a way I can prevent that, either by making it ask or by just failing.

I don't want to remove snap entirely, just stop apt from installing snaps automatically or at all.

4
  • 2
    One imagines that you are talking about a migrated application like Chromium or Firefox? Or did you encounter some other situation where this occurred?
    – user535733
    May 26, 2022 at 3:56
  • There is no simple programmatic way to do this. The user must read the Release Notes, which lists those transitional debs. Then decide if they wish to keep using the debs from a non-Ubuntu source (and then locate/add such source), or if they wish to pin the deb at an older pre-migration version. The system cannot do that research nor make that decision for the user.
    – user535733
    May 26, 2022 at 13:58
  • @user535733 so far firefox and discord i need as normal packages because there are lots of plugin/extension stuff doesn't work for them if they are snaps, also a lot of snap versions of applications start slower, such as firefox. i use a ppa for firefox cause if i pinned an old version i would get my data hacked eventually i assume. i thought about overriding apt with a script which checks if something is a snap before calling the real apt or displaying a warning then calling apt.
    – user1551357
    May 26, 2022 at 18:52
  • Also HERE on how to stop Firefox updating/installing snap version. But on the whole this apt-snap problem makes me avoid installing with apt in terminal these days. As an alternative, I also use Apper in Kubuntu, which I expect only installs debs. The same for Muon (which looks like Synaptic).
    – cipricus
    May 12, 2023 at 11:57

1 Answer 1

1

If you remove snap, then you can pin it so that it is never installed by another apt package (e.g. chromium/firefox).


If you don't remove snap altogether, you can't prevent apt from running snap in the backend, because snap is already installed.

However, you can read the description of the package in https://packages.ubuntu.com to figure out whether it is a dummy package for snap. For example, both Firefox and Chromium debs say that they are dummy packages.

Alternatively, run apt show firefox to read the package description.

So, read the description before you install anything.

You must log in to answer this question.