9

I was mind blown when after fresh installing 22.04 I saw firefox taking 10 seconds to cold start on my state of the art rig - Intel Core i9 12900K / G.Skill 64 GB DDR5 5600 Mhz / Samsung 980 PRO M.2 PCI4 / Nvidia RTX 3080.

So I did what many people recommended - uninstalled snap firefox, completely exterminated snap and installed it using the mozillateam ppa:

sudo add-apt-repository ppa:mozillateam/ppa
sudo apt install -t 'o=LP-PPA-mozillateam' firefox

All good, Firefox 99 is installed.

But now I have a problem. There's still an older version 98 lurking in the apt:

$ sudo apt list --upgradable -a
Listing... Done
firefox/jammy 1:98.0.2+build1-1~xtradeb3 amd64 [upgradable from: 99.0.1+build1-0ubuntu0.22.04.1~mt1]
firefox/jammy 1:1snap1-0ubuntu2 amd64
firefox/jammy,now 99.0.1+build1-0ubuntu0.22.04.1~mt1 amd64 [installed,upgradable to: 1:98.0.2+build1-1~xtradeb3]

And as soon as I do

$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  firefox
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 62.8 MB of archives.
After this operation, 555 kB disk space will be freed.
Do you want to continue? [Y/n] 

This actually downgrades the current version 99 to version 98. Then firefox refuses to start and demands creating a new profile because the version was downgraded. WTF? How do I prevent firefox being "upgraded" from anywhere else but the mozillateam repository it was installed from?

EDIT:

$ sudo apt cache policy firefox
E: Invalid operation cache

EDIT2:

$ apt policy firefox
firefox:
  Installed: 99.0.1+build1-0ubuntu0.22.04.1~mt1
  Candidate: 1:98.0.2+build1-1~xtradeb3
  Version table:
     1:98.0.2+build1-1~xtradeb3 500
        500 https://ppa.launchpadcontent.net/xtradeb/apps/ubuntu jammy/main amd64 Packages
     1:1snap1-0ubuntu2 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
 *** 99.0.1+build1-0ubuntu0.22.04.1~mt1 500
        500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

EDIT3: Fix, I think

Thanks to @Henning Kockerbeck suggestion I've realized that adding ppa priority is the fix.

sudo vim /etc/apt/preferences.d/mozillateamppa

File contents:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501
8
  • 2
    If you can reliably reproduce a significantly longer startup time for Firefox Snap than for Firefox Deb, then please file a proper bug report because the Firefox developers current testing has no significant difference, and they'd like to get your problem identified and fixed.
    – user535733
    Apr 23 at 14:54
  • @user535733 Thanks for your suggestion, but that's not what the question is all about. The question is about preventing APT from downgrading firefox.
    – Caballero
    Apr 23 at 14:59
  • @user535733 Done.
    – Caballero
    Apr 23 at 15:12
  • 3
    There's probably a mix-up. The information necessary can be obtained by apt-cache policy firefox, or by the newer apt policy firefox :) @Caballero, please add the output of one of those commands to your question. Apr 23 at 15:21
  • 1
    @OrganicMarble Thanks. Great observation. I've added this for Filezilla, but it has other apps besides it including Firefox. What is still weird though is why APT tries to downgrade Firefox when it finds an older version in this repository. I thought default APT behavior was to always go for the latest version?
    – Caballero
    Apr 24 at 17:10

1 Answer 1

7

To have the PPA of mozillateam take precedence over the Ubuntu software sources, add a rule:

cat <<EOF | sudo tee /etc/apt/preferences.d/mozillateam.pref
# To prevent repository packages from triggering the installation of Ubuntus snap
# version of firefox, this file prioritizes the packages of mozillateam

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
EOF

Now, a sudo apt install firefox will install the package from the mozillateam PPA instead.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.