Mozilla Firefox has a popular feature for background updates. It automatically downloads updates and installs them without requiring a fresh install of Firefox, similar to app updates on your iOS and Android devices.

However, the automatic updates feature in Firefox isn’t as convenient as it sounds. Most of the time, users have to restart Firefox to complete the update. To make things worse, Firefox even forces the user to restart the browser to continue using it. For this reason, or for avoiding unnecessary downloads every once a while, users might turn off the auto-update feature, and instead, choose to update Firefox manually.

Whether you have chosen to install Firefox updates manually, or Firefox is failing to install an update, you can always use the commands mentioned below to update Firefox from the terminal on Ubuntu and other Debian based distros.

Update Firefox from Terminal using Ubuntu standard repository

You can update your Firefox installation on Ubuntu from the Ubuntu standard repository, using the apt (previously apt-get) package manager tool.

sudo apt update
sudo apt install firefox

For older Ubuntu versions (released before year 2014)

sudo apt-get update
sudo apt-get install firefox

However, this method is constrained to install the latest version of Firefox present in the Ubuntu repository. The Firefox release cycle differs from the Ubuntu release cycle, and it is possible that the Ubuntu standard repository does not have the latest Firefox package.

To get around that, you may want to add the Mozilla repository to your system. This will make sure that you get the latest stable version of Firefox.

sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
sudo apt-get update
sudo apt-get install firefox

However, having multiple PPAs in your system for the same package (read Firefox) may lead to package conflicts. In that case, you may want to skip the apt package altogether and download the latest Firefox version directly from the web address using the good old wget command.

Download and install Firefox from the command line using ‘wget’

To avoid package conflicts with multiple PPAs, you can use the wget download the latest Firefox version from the Mozilla servers, and then extract and copy the installation files to appropriate locations to complete the update.

It’s a fairly simple process. And it works for all Linux distributions, not only Ubuntu or other Debian based distros.

wget -O firefox-latest.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
tar -xvjf firefox-latest.tar.bz2
sudo mv firefox /opt/
sudo ln -sf /opt/firefox/firefox /usr/bin/firefox

Let us summarize what the above commands are doing:

  • wget is downloading latest Firefox archive file
  • tar is extracting the downloaded archive file
  • mv command moves the extracted folder to /opt, which is usually the folder used for nonstandard software installations in Ubuntu.
  • ln is creating a symbolic link for newly downloaded Firefox binary in /usr/bin; so that the standard installation of Firefox is replaced by the updated Firefox.

After this, the user can either run Firefox command firefox from the command line, or open it from the GUI to start the updated version of Firefox.


We hope you find the information on this page helpful. If you have any questions, let us know in the comments section below.