26

I'm using Firefox 96.0 on Kubuntu (96.0+build2-0ubuntu0.21.10.1)

Sometimes, firefox updates in the background and then comes up with a message "Sorry. We just need to do one small thing to keep going.". I then can no longer do anything at all in Firefox until I restart - not open any new tabs nor use links in current tabs. This has cost me money as I have had this occur once while booking train tickets - after restart the ticket was no longer available at the offered price.

In settings, there is no option to warn about updates but wait to install them after the update: under Firefox settings/General/Firefox Updates I see

Keep Firefox up to date for the best performance, stability, and security.
Version 96.0 (64-bit) What’s new
Mozilla Firefox for Ubuntu
Canonical - 1.0

Without any option to change anything. Whenever I google I see many hints on how to disable updates for 7x-version numbers, and many people ask to disable updates altogether, which is not what I want.

Is there a way to let Firefox warn me (and this is ok to nag) to install updates ASAP but let me decide when?

2
  • 5
    I doubt it. FF in Ubuntu is updated the same way as other packages, either through apt or snap. Its own update service is removed. Commented Jan 14, 2022 at 11:36
  • 1
    Please see my answer here: superuser.com/questions/1370165/…
    – raj
    Commented Jan 14, 2022 at 12:10

7 Answers 7

11

Firefox upgdates come from the Ubuntu security repository and so are handled by unattended-upgrades. You really shouldn't delay these updates because they typically address critical security issues (see https://ubuntu.com/security/notices?order=newest&release=focal&details=firefox).

As to why Firefox exhibits this behavior, see https://bugzilla.mozilla.org/show_bug.cgi?id=1492023.

That said, you could change this behavior by doing one of the following:

Option 1: Install unattended upgrades only at shutdown:

In the file /etc/apt/apt.conf.d/50unattended-upgrades, uncomment and change this line:

//Unattended-Upgrade::InstallOnShutdown "false";

To this:

Unattended-Upgrade::InstallOnShutdown "true";

Then use the command line to add a configuration snippet for logind to allow longer delays during shutdown so packages have time to install:

sudo mkdir /etc/systemd/logind.conf.d
echo "InhibitDelayMaxSec=3600" | sudo tee /etc/systemd/logind.conf.d/00-InhibitDelayMaxSec

Option 2: Block unattended upgrades of Firefox:

This will block unattended upgrades of Firefox packages, so you will have to remember to manually run sudo apt upgrade firefox somewhat frequently.

In the file /etc/apt/apt.conf.d/50unattended-upgrades, add "firefox"; to the Unattended-Upgrade::Package-Blacklist section by changing this:

// Python regular expressions, matching packages to exclude from upgrading
Unattended-Upgrade::Package-Blacklist {
    // The following matches all packages starting with linux-
//  "linux-";

To this:

// Python regular expressions, matching packages to exclude from upgrading
Unattended-Upgrade::Package-Blacklist {
    "firefox";
    // The following matches all packages starting with linux-
//  "linux-";
2
  • 1
    This is the most informative reply I have seen so far, thanks! I agree with that you shouldn't delay security updates too long, but say half an hour (to finish booking a train ticket) should not matter too much IMHO. I am first trying Terrence's solution, if that is unsatisfactory, I'm going to do yours.
    – IIVQ
    Commented Jan 17, 2022 at 8:16
  • 2
    Setting security update settings to "notify only" instead of "automatically download & install" (which is the default) - like in Archisman Panigrahi's answer - should also work. At least it works for me. I get a popup every time there are any updates to be installed and I have to manually accept the installation. This is the best option IMHO, and not only related to Firefox updates, but to any updates in general.
    – raj
    Commented Jan 17, 2022 at 10:54
11

This answer is about turning off automatic updates. It does not notify you before the update.


Replace the snap version of firefox with the apt version. It would only update when you update the rest of the packages.

(For Ubuntu 22.04 and above, see this answer to install the pure apt version of Firefox.)

sudo snap remove firefox
sudo apt install firefox

Make sure to turn off automatic updates in the Software & Updates settings.

automatic update

However, make sure to manually apply updates in a regular basis.

13
  • 1
    @IIVQ Please check the edited answer. Commented Jan 14, 2022 at 15:07
  • 4
    ALSO, for 22.04 cycle, Firefox is solely snapped, and you will not be able to opt out of these updates in the next release of Ubuntu - this was a decision by Firefox upstream to start snapping it and outside our total control (the apt version will, like the Chromium browser package, simply be a metapackage that installs the snap)
    – Thomas Ward
    Commented Jan 14, 2022 at 15:50
  • 4
    @ThomasWard We will still have Debian/Linux Mint repositories for non-snapped firefox :) Commented Jan 14, 2022 at 16:36
  • 1
    Thanks for the comments. I explicitly do not want to disable automatic updates, but I would like firefox to give me a popup so I can deny/delay it when I'm working at something where an immediate restart is undesireable (video call session / booking a ticket / ...). But it seems such an option does not exist.
    – IIVQ
    Commented Jan 14, 2022 at 17:09
  • 3
    @JonBentley Holding the firefox package will completely prevent it from updating. That's why, I suggested OP to manually update the computer. Automatic updates in the background can often lead to issues, for example, a faulty update of the graphics driver before a presentation can ruin it. In my opinion, it is a good idea to know what is being updated. This is not Windows. Users should control when they want to update. Commented Jan 15, 2022 at 4:30
5

NOTE: This answer is for when you install Firefox directly from Mozilla and not from the repos (snap/apt-get).


If you go to about:config in the address bar and then state that you will be careful, you can set some update settings that should help you.

In the search box after going to about:config type in app.update and set the one for app.update.auto to false, then lower set the app.update.notifyduringdownload to true so that you know when it is going to update.

enter image description here

enter image description here

Hope this helps!

3
  • I made this setting, now to wait for another update. Will keep you posted!
    – IIVQ
    Commented Jan 17, 2022 at 8:12
  • 4
    This will not work in Ubuntu when Firefox is installed through snap/apt. The package manager is managing the updates, not Firefox itself.
    – Dan
    Commented Jan 17, 2022 at 9:27
  • 1
    @IIVQ Dan above does have a good point. I am sorry, but this is for when you have Firefox not being controlled by Canonical through the snap/apt package manager. Mine is actually installed from Mozilla themselves.
    – Terrance
    Commented Jan 17, 2022 at 14:33
3

There is a check box in Settings - General Tab to tell Firefox to stop auto update See this:

Image of Firefox settings user interface

Update:

The answer by @Terrance defines another way of disabling update by modifying config variables. There is still another way of defining config variable to enable/stop app update or other things: by defining enterprise policies. The steps are outlined below.

  1. Open Firefox and type about:policies in the address bar. Press the enter key.
  2. A window will open which will list policies already defined.
  3. Click the "Documentation" Tab on the left and you will see a long list of config variable you can define as policy in Firefox.
  4. Close Firefox and create a folder distribution under Firefox directory.
  5. Create a file policies.json inside the 'distribution' folder just created. Refer Documentation tab for name of variables as in step 3.
  6. Edit the file policies.json and specify config variables like this.
{
 "policies": {
   "DisableAppUpdate": true,
   "DisableFirefoxAccounts": false,
   "DisableFirefoxStudies": true,
   "DisablePocket": true,
   "DisableTelemetry": true,
   "DontCheckDefaultBrowser": true,
   "SearchBar": "separate"
   }
}
  1. Save the file and restart firefox.
  2. Check the active policies by following step 1.

You should see something like this.

image of Firefox policies user interface

4
  • 4
    This check box is not in my version (96) of firefox.
    – IIVQ
    Commented Jan 14, 2022 at 13:12
  • 2
    @IIVQ If you don't have this checkbox then you probably have apt version of Firefox, which is updated by system updater. In that case my answer from SuperUser should work (linked in the comment below your question) - at least it works for me and gives me prompt to install updates. If you have a non-apt version of Firefox, downloaded directly from Mozilla and installed manually, then this checkbox should be present. Either one or the other.
    – raj
    Commented Jan 14, 2022 at 22:17
  • @raj Indeed I do not have this button, but Firefox still auto-updates mid-session.
    – IIVQ
    Commented Jan 17, 2022 at 8:13
  • @IIVQ Did you change the system update settings to "notify only" for security updates?
    – raj
    Commented Jan 17, 2022 at 10:47
1

It turns out that the snap version of Firefox that is supplied with versions of Ubuntu from 22.04 will update automatically..

.. the snapd daemon checks for updates four times a day by default..

.. but, unlike the .deb version of Firefox, the sandboxing of snap programs means that you can continue using the current one for as long as you like afterwards.

For this reason alone, I am prepared to tolerate Firefox being a snap.

(My problem is that there's no notification that a snap update has happened! As the new version will only be used once you close the (still working) previous one, if you keep the PC on and don't close Firefox, you'll never know there's a new version ready to use when you restart.)

0

I blocked unattended firefox upgrades as suggested by @fuzzydrawrings, then added an update notification using cron. First run crontab -e to edit your crontab file, then add this line:

0 11 * * * apt list --upgradeable | grep firefox && XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send --expire-time=0 "an update is available for firefox"

(note the line above is too long to be shown here, but you can copy the whole thing)

This line says:

  • 0 11 * * * every day at 11:00
  • apt list --upgradeable | grep firefox check whether there is a firefox update available
  • && XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send ... and if so, pop up a persistent notification
0

Running Firefox 64bit ver.108, and for quite awhile the setings for auto update has been 'missing'. If you want to still get updates, just not automatically (asks you instead of just interrupting and forcing update at inopportune times...), then try this:

The way I was able to 'disable' the auto firefox update (still downloads, just doesn't interrupt you and install while you sit there helpless) was: open settings - type 'about:config' then type 'app.update.auto' and change the setting to 'false' (see below from documentation)

AppAutoUpdate

Enable or disable automatic application update.

If set to true, application updates are installed without user approval within Firefox. The operating system might still require approval.

If set to false, application updates are downloaded but the user can choose when to install the update.

If you have disabled updates via DisableAppUpdate, this policy has no effect. Compatibility: Firefox 75, Firefox ESR 68.7 CCK2 Equivalent: N/A Preferences Affected: app.update.auto

So, also don't forget to type 'DisableAppUpdate' and change it to 'false' also!

MEANWHILE - be careful when using this 'about:config' as it can really mess things up if you are not VERY, VERY careful!!!

...for good measure, edit the /etc/firefox/policies/policies.json (and in any edit the /etc/firefox/distribution/policies.json) and delete the stuff there and instead add:

{
  "policies": {
    "AppAutoUpdate": false, 
    "DisableAppUpdate": false
  }
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .