To remove firefox snap from Ubuntu 22.04 (which uses snap as default for firefox)

  • Why remove snap?
    • Because firefox then does not use gtk themes and sticks out like a sore thumb if the rest of the desktop uses some fancy gtk-theme
    • Snaps have issues working in docker containers etc.
 1sudo snap remove firefox
 2sudo add-apt-repository ppa:mozillateam/ppa
 3
 4echo '
 5Package: *
 6Pin: release o=LP-PPA-mozillateam
 7Pin-Priority: 1001
 8' | sudo tee /etc/apt/preferences.d/mozilla-firefox
 9
10echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
11
12sudo apt install firefox