I am using Ubuntu 24.04 and would like to install Firefox directly from the official Mozilla repository instead of the default Ubuntu Snap/PPA repositories.
-
3Sad that this was marked as a duplicate since none of the answers on that other page is a 1 to 1 match for Ubuntu 24.04. – Alexis Wilke Mar 10 '25 at 15:45
-
And the lead answer of the duplicate is old, because it uses Mozilla's PPA not their APT repository as they now recommend. See support.mozilla.org/en-US/kb/install-firefox-linux. – Andrew Apr 11 '25 at 21:47
1 Answers
To install Firefox from the official Mozilla repository on Ubuntu 24.04, follow these steps:
Install the repository key:
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | gpg --dearmor | sudo tee /etc/apt/keyrings/packages.mozilla.org.gpg > /dev/nullCreate a deb822-formatted .sources file in
/etc/apt/sources.list.d/mozilla.sourceswith the following content:Types: deb URIs: https://packages.mozilla.org/apt Suites: mozilla Components: main Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpgSet the apt repository priority by creating/editing the file
/etc/apt/preferences.d/mozillawith the following content:Package: firefox* Pin: origin packages.mozilla.org Pin-Priority: 1001Allow unattended upgrades for the mozilla repository by creating/editing the file
/etc/apt/apt.conf.d/51unattended-upgrades-firefoxwith the following content:Unattended-Upgrade::Origins-Pattern { "archive=mozilla"; };Remove the snap and apt installation of Firefox:
sudo snap remove firefox sudo apt remove firefoxUpdate the package list:
sudo apt updateInstall Firefox from the Mozilla repository:
sudo apt install firefox(Optional) Install additional translations with the packages
firefox-l10n-XXwhere XX is the language identifier (e.g.firefox-l10n-itfor Italian).sudo apt install firefox-l10n-XX
By following these steps, you should have Firefox installed from the official Mozilla repository on your Ubuntu 24.04 system.
- 1,164
-
In my case, the snap firefox comes back (i.e. point 5
sudo snap remove firefoxworks at the time I run the command, but within a day or so, it's back!). I'm thinking that's a snap thing (not apt-get trying to install firefox). Have you had that issue? – Alexis Wilke Mar 26 '25 at 23:13 -
I will be testing this other preference file on top of yours... That other one is a negative instead of a positive. Maybe it will help. – Alexis Wilke Mar 26 '25 at 23:32
-
The eight steps above worked perfectly in my Ubuntu 24.04. I no longer have the sandboxed firefox from snap which is giving me a headache. I can now open html from other folders outside from
$HOMEfolder, which I needed very badly. Thank you so very much! – daparic May 27 '25 at 11:10