This answer is for the latest stable version of Firefox. You can use the Firefox PPA maintained by Mozilla team.
sudo add-apt-repository ppa:mozillateam/ppaThen, copy and paste the following code in a terminal in one go (don’t copy-paste line by line) to prioritize the apt version of firefox over the snap version.
echo ' Package: * Pin: release o=LP-PPA-mozillateam Pin-Priority: 1001 Package: firefox Pin: version 1:1snap1-0ubuntu2 Pin-Priority: -1 ' | sudo tee /etc/apt/preferences.d/mozilla-firefoxNext, remove the snap version of firefox
sudo snap remove firefoxInstall Firefox with apt.
sudo apt install firefoxTo ensure that unattended upgrades do not reinstall the snap version of Firefox, enter the following command. Alternatively, you can turn off unattended upgrades.
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
To undo these changes
- Remove the firefox PPA.
sudo add-apt-repository -r ppa:mozillateam/ppa
- Remove the apt pin.
sudo rm -rf /etc/apt/preferences.d/mozilla-firefox
- Remove the apt version and reinstall snap.
sudo apt remove firefox && sudo snap install firefox