Ubuntu – Disabling firefox background upgrades

firefoxupgrade

Through the process of reviewing suggestions for this problem and other testing,the focus has narrowed. The problem has now been identified as: "how to prevent firefox from being updated automatically". Which makes the suggested duplicate's solution applicable, but a bit more extreme than desired because I want other updates to happen.

I am leaving the original question/update here for reference, for those that may be experiencing the same but not associating the symptoms.

Has anyone else figured out if this can be prevented? I have been annoyed for a couple of years by being forced to restart firefox once an update has happened in the background.
For the most part I figured this to be a firefox issue, but I just had a conversation with another ubuntu user that believes that there may be a difference between the way mozilla-downloaded firefox and ubuntu-installed firefox handles updates.

Does anyone know if there is any truth to that? That person is under the impression that ubuntu-installed firefox does not do background updates…. WHICH WOULD BE GREAT!!! but, I have the firefox that came stock with ubuntu.

For a little background (because I was shocked to know this user has never seen this before), whenever firefox updates in the background, every new tab looks like the attachment here. You can't get a working tab until you restart firefox… which is EXTREMELY annoying/intrusive especially when you have a dozen or so tabs open that you are actually using.

enter image description here

SOOOOO… at this point has anyone figured out how to prevent this? or stop the auto-background-upgrades… (which seem to be different in timing from the ones coming from the software updater)… or delay them? Over the years I have played with some of the numbers in about:config and extended them out to years, to no avail. I don't "think" this is a nightly ubuntu "unattended-upgrade", because then I would probably never see available firefox upgrades in software center, and I often do. As far as my software… it's been happening over the last 2 or 3 ubuntu versions… I even think it happens in Opera(but I don't care about Opera). I know this is more of a "policy" than a "problem", but now I am more focused on the prospect that it may be ubuntu install vs mozilla download install related? And that I remember questions like this from long ago and wondering if anyone knew of any progress or obtained any new information?

update – new info:
Because I was working with someone else with this in the evening, I was paying close attention. My firefox version was 80.0.1 last night. Same thing JUST happened on a different machine, I got the You Will Restart Now and Like It tab seen above. I restarted and now I have version 81. Being that I DEFINITELY know I didn't get a Software Updater popup, I started checking into unattended-upgrades…. and what do you know… (after all of these years) According to this /var/log/unattended-upgrades/unattended-upgrades.log, firefox is actually an unattended-upgrade(which i did not believe).

enter image description here

Knowing this now, @N0rbert's answer will definitely probably help this, but I want to only kill the unattended-upgrades for firefox. So I will now shift to figuring that part out. I'm still a little baffled that some firefox users have never seen this. Makes me think there is a little more to it or that it is common practice to turn off unattended-upgrades??? will update.

Best Answer

  • According to the file /etc/apt/apt.conf.d/50unattended-upgrades You should be able to blacklist packages from being unattended-upgraded as so. (this does not effect manual apt updates)

    add firefox to the Package-Blacklist portion of the file.

    sudo vi /etc/apt/apt.conf.d/50unattended-upgrades

     Unattended-Upgrade::Package-Blacklist {
          "firefox";
    };
    

    save and exit

    not 100% sure which, if any, services need to be restarted... So I rebooted just to be sure.

    Testing:
    It will most likely be a while before you can test this configuration depending on whether or not a firefox update is currently available... which can be verified by listing the current upgradable packages:
    sudo update
    sudo apt list --upgradable
    and looking for firefox in the output.
    If it is there you can run the following test run to verify the configuration change made to 50unattended-upgrades.

    unattended-upgrade -d --dry-run will run the unattended upgrades but not make any changes. It should list any package beginning with "firefox" as blacklisted and the "Packages that will be upgraded" should not contain any package beginning with "firefox".
    If you do not use the debug flag -d , you will have to look in /var/log/unattended-upgrades/unattended-upgrades.log to verify the output.

  • Related Question