How to install, uninstall and update Firefox on Ubuntu 18.04 Bionic Beaver Linux -

Mozilla Firefox is a default Internet browser on Ubuntu 18.04 so this article only shortly mentions installation and focuses also on uninstall and update processes.

This is a companion discussion topic for the original entry at

The article suggests linking the firefox executable only, but that can cause problems.

I would suggest the following:

# remove the current version of firefox (don't move it)
sudo apt-get remove firefox

# fetch and extract
wget -O ~/FirefoxSetup.tar.bz2 ""
sudo tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/
rm ~/FirefoxSetup.tar.bz2 # cleanup

# remove any lingering remnants of the old firefox
sudo rm -rf /usr/lib/firefox

# link the entire directory for firefox so that policies or autoconfigs can make it in safely
sudo ln -s /opt/firefox/ /usr/lib/firefox

# recreate the link that the terminal would expect
sudo ln -s /usr/lib/firefox/firefox /usr/bin/firefox

# test it out
firefox --version