2

I've just upgraded to a version of Ubuntu that's forcing a Snap of Firefox on me. This doesn't work for me, I don't want it. I've found an alterative source for the package (mozillateam's PPA still builds) but it's being trumped by the newer epoch of 1:1snap1-0ubuntu2.

I want Apt to blacklist versions of the firefox package that contain snap.

There is another question that features a lot of the same words, but I don't see how its answer applies. That only seems to block one version. I assume there will be future 1:*snap* versions, and I don't want to play ping-pong with this.


Dupe question helps. Added this to: /etc/apt/preferences.d/99-kill-firefox-snap.

Package: firefox
Pin: release o=Ubuntu
Pin-Priority: 100

Thanks all.

Oli
  • 293,335
  • SInce apt_preferences supports wildcards, that answer should work with very little change in essence. Pin: version 1:*snap* should work just fine. (With Priority: -1 if you want absolutely block the matching package versions from installation) – muru Apr 01 '22 at 09:06
  • You can use something like this to increase the priority of firefox from launchpad or decrease the priority of firefox from *.ubuntu.com. Instead of blacklisting the version, blacklist the origin – Archisman Panigrahi Apr 01 '22 at 09:11
  • I VTC'd for https://askubuntu.com/questions/293619/assign-higher-priority-to-ppa since it has examples covering wildcards, origins and actual blocking by setting negative priority as well. The manpage says regex is also supported, so Pin: version /.*snap.*/ is also an option. – muru Apr 01 '22 at 09:24
  • 1
    With the release origin marking, I can just select Pin: release o=Ubuntu for firefox and that covers it. Now it'll look anywhere else (eg PPA) before looking at Ubuntu's repos. Added an edit for Firefox users in the same situation. – Oli Apr 01 '22 at 09:28

0 Answers0