The Ubuntu team has
plans to finally switched to Mozilla’s official Firefox Snap package as default web browser in Ubuntu 22.04 LTS!
This tutorial is also tested and works in Ubuntu 23.04.
Ubuntu decided to switch Firefox to Snap package last year when in development of Ubuntu 21.10. Classic DEB was available in system repository for choice. In Ubuntu 22.04, Firefox Deb package is no longer available in system repository! Just like Chromium in Ubuntu, the
apt install firefox command even redirects to SNAP.
Snap is an universal package format runs on all Linux distributions. A snap package bundles most dependency libraries and runs on top of a separate daemon that developed by Canonical, the company behind Ubuntu. Since Ubuntu 20.04 LTS, the Ubuntu Software is “Snap Store” itself is a snap. And the chromium browser in official repository refers to the Snap package.
This will only impact users of Ubuntu Desktop installing 21.10 or upgrading to 21.10. If you run one of the flavours, you won’t be affected – yet. The deb will continue to be supported through the life cycle of 21.10, and the deb to snap transition is scheduled to be completed in 22.04.
According to the discussion, Ubuntu will support the Firefox deb until the next (long term support) LTS. So, users may remove the Snap edition if don’t like it in Ubuntu 21.10, and install back the native Deb package.
Why remove Firefox Snap package:
Definitely, I don’t hate Snap. But Firefox Snap looks a little out of ordinary in Ubuntu 21.10. When using the light theme, it has a dark header bar while all others are light.
UPDATE: Firefox Snap now is looking good in Ubuntu 22.04 LTS! But still lacks of gnome extension support at the moment.
Also, Firefox Snap refuses to install Gnome Shell Extensions from extensions.gnome.org, though the
chrome-gnome-shell package is properly installed.
Until the development fixed the issue, I have to switch back the classic Firefox in deb format!
Step 1: How to Remove Firefox Snap in Ubuntu:
Firstly, press Ctrl+Alt+T key combination on keyboard to open a terminal window. When it opens, paste the command below and hit run:
snap remove --purge firefox
This command will remove the pre-installed Firefox Snap package.
The Firefox Deb package may also be installed on your system, though it’s just an empty wrapper to the Snap package. To remove it, run command:
sudo apt remove --autoremove firefox
Step 2: Install back the classic Firefox Deb package:
For Ubuntu 22.04 LTS & Ubuntu 23.04, the “Mozilla Team” team PPA maintains the most recent Firefox packages in DEB.
Not sure if it’s official, but Olivier Tilloy who maintains Ubuntu’s Firefox package is a Ubuntu team member. And, Rico Tzschichholz who packaged Firefox in this PPA is also the maintainer of many other Ubuntu/Debian’s official packages.
1. Add the PPA:
Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to add the PPA:
sudo add-apt-repository ppa:mozillateam/ppa
Type user password when it asks (no visual feedback) and hit Enter to continue. As you see, the PPA also contains latest Firefox ESR.
2. Set PPA Priority:
If you would like to receive updates from this PPA automatically, it’s better to set a higher package priority. Because Ubuntu may opt to install Firefox from its own repository (empty package link to Snap).
To do so, open terminal (Ctrl+Alt+T) and run command to create a config file and open via nano command line text editor:
sudo nano /etc/apt/preferences.d/99mozillateamppa
When it opens, add following lines:
- add the 3 lines below will set higher priority for Firefox package from this PPA
Pin: release o=LP-PPA-mozillateam
- And the lines below will block Firefox from Ubuntu’s own repository. Without this section, Firefox will go back SNAP once you disabled/removed the PPA and run system update.
Pin: release o=Ubuntu
Press Ctrl+X, then type y, and hit Enter to save change.
3. Install Firefox from PPA:
Finally install Firefox as Deb package using the command below:
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
Finally, you may search for ‘Firefox’ from Activities overview screen and right-click to select bind it to dock launcher.
Besides Mozilla Team PPA, you may also use the official Mozilla portable Linux package from its website. However, you have to download the package every time a new release is out! And, a third-party ubuntuzilla repository is available for choice.