I am trying to prevent APT from installing any Snap-based packages on my system. For example, some packages are offered as Snap versions with names like the following:
- Firefox:
1:1snap1-0ubuntu5 - Thunderbird:
2:1snap1-0ubuntu3 - Chromium-browser:
2:1snap1-0ubuntu2
I want to block or lower the priority of all such Snap versions so that APT defaults to .deb packages from other repositories or PPAs. However, the method I tried so far hasn't worked.
I created a snap.pref file in /etc/apt/preferences.d/ folder with the following content:
Package: *
Pin: version *snap*
Pin-Priority: -1
However, apt responded with W: Did not understand pin type version and didn't update the priority for Snap-based packages.
Can you suggest the right way to do this?