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-";