Objective

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.

Operating System and Software Versions

  • Operating System: - Ubuntu 18.04 Bionic Beaver Linux

Requirements

Privileged access to your Ubuntu System as root or via sudo command is required.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

As already mentioned, Firefox is a default Internet browser on Ubuntu 18.04 Bionic Beaver system. This means that most likely it is already installed on your system. There are three possible sources for Firefox installation:
  • Standard Ubuntu repository - this is default and already configured on your system. Standard Ubuntu repository will yield most stable Firefox version but may not be aligned with the latest Firefox version available.
  • Mozilla PPA repository - Adding Mozilla developer PPA repository often allows user to install more up to date Firefox version in comparison to the default Ubuntu repository at the cost of lower stability.
  • Direct download - User can download and install the latest Firefox version from the official Mozilla.org website.
In this article we will discuss how to install, uninstall and update Firefox on Ubuntu 18.04 from all the above installation sources.

Before you move on open up terminal and update the apt index as well as optionally check your current Firefox version:
$ sudo apt update
$ firefox --version
Mozilla Firefox 57.0.1
Now we are ready to install or update Firefox by selecting one of the sections below.

$$$ Looking for LINUX ADMINISTRATOR ! $$$

BLUE SKY STUDIOS are looking for Linux Administrator to maintain and support the Studio's 450+ production Linux workstations, including daily interactions with the Studio’s digital animation artists.
LOCATION: Greenwich, Connecticut, USA

APPLY NOW

Install and Update Firefox from Ubuntu repository

Install Firefox

The Firefox web browser is most likely installed on your Ubuntu 18.04 system. If this is not the case you can install it be executing the following linux command:
$ sudo apt install firefox

Update Firefox

The following linux command will update the already installed Firefox using the default Ubuntu repository. If the Firefox is not installed yet it will be installed:
$ sudo apt install firefox
However, the recommended approach is to update the entire Ubuntu system rather than a single package. To do so execute:
$ sudo apt upgrade

Uninstall Firefox

To uninstall Firefox we can once again use apt. The following linux command will uninstall Firefox from your system:
$ sudo apt remove firefox

Install and Update Firefox from Mozilla PPA repository

The following section will explain on how to install and update Firefox using Mozilla developer PPA repository.

Install Firefox

To install the latest Firefox version from the Mozilla developer PPA repository first add Mozilla signing key:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F
Next, add repository:
$ sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu bionic main"
$ sudo apt update
If all went well we are now ready to install Firefox:
$ sudo apt install firefox

Update Firefox

The following linux command will update the already installed Firefox using the default Ubuntu repository. If the Firefox is not installed yet it will be installed:
$ sudo apt install firefox

Uninstall Firefox

To uninstall Firefox execute the following linux command:
$ sudo apt remove firefox


Install and Update Firefox with Direct download

Install Firefox

Using direct download from the official Mozilla.org website we are able to install the most recent Firefox version. Let's start by downloading the Firefox installation package:
$ wget -O ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
Next, extract the Firefox package to /opt/ directory:
$ sudo tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/
Make a backup of the original Firefox binary executable in case we need to switch back to the default Ubuntu Firefox version:
$ sudo mv /usr/lib/firefox/firefox /usr/lib/firefox/firefox_backup
Lastly, create an /usr/lib/firefox/firefox executable by creating a new symbolic link from the /opt/firefox directory:
$ sudo ln -s /opt/firefox/firefox /usr/lib/firefox/firefox
All done.

Update Firefox

To update the Firefox simply re-download the latest Firefox installation package and extract the package content:
$ wget -O ~/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
$ sudo tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/

Uninstall Firefox

To uninstall Firefox, simply remove the previously created /opt/firefox directory and switch back to the default Ubuntu Firefox version installed from the Ubuntu repository:
$ sudo rm -fr /opt/firefox
$ sudo mv /usr/lib/firefox/firefox_backup /usr/lib/firefox/firefox
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.