Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4439

How do I pin apt version of Firefox on Ubuntu 22.04?

$
0
0

I followed the instructions on Mozilla support website:

Install Firefox .deb package for Debian-based distributions (Recommended)

To install the .deb package through the APT repository, do the following:

  1. Create a directory to store APT repository keys if it doesn't exist:

    sudo install -d -m 0755 /etc/apt/keyrings
  2. Import the Mozilla APT repository signing key:

    wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

    If you do not have wget installed, you can install it with: sudo apt-get install wget

  3. The fingerprint should be 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3. You may check it with the following command:

    gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'

  4. Next, add the Mozilla APT repository to your sources list:

    echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

  5. Configure APT to prioritize packages from the Mozilla repository:

    echo 'Package: *Pin: origin packages.mozilla.orgPin-Priority: 1000' | sudo tee /etc/apt/preferences.d/mozilla
  6. Update your package list, and install the Firefox .deb package:

    sudo apt-get update && sudo apt-get install firefox

So now I have:

$ apt list --installed | grep firefoxfirefox/mozilla,now 132.0~build1 amd64 [installed]$ snap list | grep firefoxfirefox                    131.0.2-1                    5091   latest/stablemozilla**         -

I don't mind having both apt and snap versions installed on my system. The problem is the apt version gets uninstalled when a software update is done even though the "Configure APT to prioritize packages from the Mozilla repository" step was done.

How do I stop the apt version being uninstalled and replaced by snap from software updates?


Viewing all articles
Browse latest Browse all 4439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>