How to update Firefox in Ubuntu Linux

This tutorial explains how to install and upgrade the Firefox Quantum version and the latest developer version in Ubuntu 17.10 and in Ubuntu 16.04 step by step with practical examples. Learn how to install, update and upgrade the Firefox web browser in Ubuntu Linux including some basic troubleshooting tips in detail.

Accessing Internet through older version of Firefox involves several security risks. Known security bugs in older version may lure hackers in breaking the system security. To minimize the security risk, Firefox should be kept up to date.

Before we learn how to update the Firefox in Ubuntu, let me answer a common question which I frequently receive from users while I suggest them to update the Firefox.

I have just installed the latest version of Ubuntu, should I also update the Firefox?

Yes, of course if system security is the top priority, you should also update the Firefox. Let’s understand this in a little bit more detail.

Firefox ships with Ubuntu installation disk. It installs in system automatically while we install the Ubuntu. While installing the latest version of Ubuntu, we usually assume that since it’s the latest version of Ubuntu, it should also contain the latest version of Firefox.

Well … this assumption is half true. Yes, Ubuntu uses the latest version of Firefox while building the latest stable version. But this latest version of Firefox remains the latest while installing Ubuntu may be or may not be true.

Firefox and Ubuntu both use different update and release cycle. Due to this difference, there is always a chance of getting an older version of Firefox through default installation.

To understand it more clearly, let’s check the installed version of Firefox through default installation in Ubuntu 16.04 and Ubuntu 17.10.

To view the Firefox version information, click Help menu item and click About Firefox option.

To view the Ubuntu version information, use lsb_realease –a command.

In version 16.04, Ubuntu used Firefox version 54.0 as default browser.

installed version of firefox in ubuntu 16.04

While in version17.10, Ubuntu used Firefox version 57.0.4 as default browser.

installed version of firefox in ubuntu 17.04

Above figures confirm that Ubuntu used the latest available version of Firefox while building the stable release. So if we get an older version of Firefox through default installation of Ubuntu, it’s not the Ubuntu who used an older version, its Firefox who made that version older by releasing the new version.

Whether we have just installed the latest version of Ubuntu or running a previously installed version of Ubuntu, we should frequently check and install the available updates in Firefox.

Updating Firefox in Ubuntu

Firefox is installed as a core extension in Ubuntu. For easy management, Ubuntu automatically creates necessary repositories for core extensions. Unless you are a developer or security tester, there is no need to add any additional repositories. Default repositories are configured to pull the latest and stable version of Firefox in Ubuntu.

There are two ways to update Firefox from default repositories: -

  1. Updating entire system
  2. Updating Firefox individually

For demonstration purpose, I will use both methods to update the Firefox. I will use first method to update the Firefox in Ubuntu 16.04 and will use second method to update the Firefox in Ubuntu 17.10.

Updating entire system

Since Firefox is the part of core extension, a system wide update will also update the Firefox. To perform a system wide update, connect system with internet and run following commands.

sudo apt-get update
sudo apt-get upgrade

First command updates and sync all configured repositories. During this operation, Ubuntu perform several essential tasks such as; checking all configured repositories whether they are accessible or not, downloading and importing required public keys, comparing locally installed packages with remotely available packages to prepare a list of available updates, etc. Actually this command prepares system for package management related operations.

sudo apt-get update

Software package management (adding/removing repository, installing/removing software etc.) requires root privilege. The user account which you create during the installation has necessary privilege. Type the password of that account when it asks for authentication.

Second command pulls and installs all available updates from configured repositories.

If system is connected with a high speed Internet connection without data limit, this option should be your first choice.

sudo apt-get-upgrade

If you have limited data in your internet pack or have a slow internet connection, do not use this option. Since this option updates all extensions and system packages collectively, it may consume a lot of data and time.

Once all updates are fetched and installed, reboot the system with following command.

$reboot

reboot ubuntu

It’s not compulsory to reboot the system. Since we performed a system wide update, a system reboot is the easiest way to clean the packages cache and leftovers.

After restart, check Firefox version again to verify that it has been updated.

firefox updated in Ubuntu 16.04

Updating Firefox individually

If you only want to update Firefox, connect system with internet and run following commands.

sudo apt-get update
sudo apt-get install --only-upgrade firefox

As explained previously, first command update and sync all configured repositories.

sudo apt-get-update

Second command updates Firefox with the latest available version

sudo apt-get install --only-upgrade firefox

Version information will not update, until we clean the package cache. Run following command to clean the packages cache.

apt-get clean

Once package cache is cleaned, check Firefox version again to verify the updating.

check firefox version in ubuntu 17.10

Installing and updating developer version of Firefox in Ubuntu

With regular and stable version, Firefox also releases developer version. Developer version contains the latest updates and features. Firefox provides these updates and features without testing, so they may contain bugs or may not work as expected.

If you are a regular user and use Firefox only for accessing the internet, there is no need to use this version. Developer version is only intended for administrators, programmers, security testers or developers who want to test their application or program with new version of Firefox.

To install developer version, use following commands

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

Usually there should be no error or issue while installing and updating Firefox through official repositories. But in some circumstance we may get following error

Error: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
Error: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

ubuntu update error

This error triggers when we try to install or update packages simultaneously. While Ubuntu is installing or updating a package, it cannot install or update another package at the same time.

When we start an install or update process, Ubuntu creates a lock file to protect the process. When process is finished, Ubuntu deletes this lock file. If installation process goes abrupt or interrupted in middle, lock file will not be deleted. Since lock file exists, Ubuntu will not start another process.

To solve this issue, we have following options:-

Restart the system.

During restart, all lock files are cleaned automatically.

Kill the process

If pervious installation process stuck in middle or not responding, use following commands to kill the process

sudo ps aux | grep apt
sudo kill processnumber
sudo kill -9 processnumber
Remove the lock file

If nothing works, remove the lock files manually with following commands

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

Once lock files are removed, package manager will be available for new process.

That’s all for this tutorial. If you like this tutorial, don’t forget to share this tutorial with your friends. If you have any comment, suggestion or feedback regarding this tutorial, please let me know.

ComputerNetworkingNotes Ubuntu Linux Tutorials How to update Firefox in Ubuntu Linux