2

I'm trying to prohibit snap packages from being installed using /etc/apt/preferences.d/pin:

Package: *
Pin: version *snap*
Pin-Priority: -10

but it doesn't work.

1 Answers1

3

Create the /etc/apt/preferences.d/99-Prohibit-Snapd file and add the following:

Package: snapd
Pin: release a=*
Pin-Priority: -10

This config prohibits snapd installation completely. So any package that depends on it will not be able to be installed and will return this error message:

The following packages have unmet dependencies:
 some-package: PreDepends: snapd but it is not installable
E: Unable to correct problems, you have held broken packages.