12 February 2022 by Korbin Brown
Every Ubuntu user that uses a graphical interface will have to interact with Mozilla Firefox in some capacity, since it’s the default internet browser on Ubuntu. Even if you just want to uninstall it and use a different browser, you’ll at least be dealing with it for a short time. In this guide, we’ll show you how you can install, update, and uninstall Firefox on Ubuntu Linux.
In this tutorial you will learn:
- How to install, update, and uninstall Firefox with Ubuntu’s default package repository
- How to install, update, and uninstall Firefox with Mozilla PPA repository
- How to install, update, and uninstall Firefox with direct download
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Ubuntu Linux |
Software | Mozilla Firefox |
Other | Privileged access to your Linux system as root or via the sudo command. |
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 |
How to install Firefox
As we mentioned earlier, Firefox is the default internet browser on Ubuntu. Therefore, it stands to reason that it’s already on your system and there’s no need for installation instructions, right? Yeah, probably. But you or someone else may decide to uninstall it and come back to it later, or maybe it’s giving you problems and you want to reinstall the software altogether. We’ll show you a few methods for how to install, update, and uninstall Firefox from your system in this section.
There are three ways we can install Firefox. All of them accomplish the same thing, but you should pick the one that best suits you:
- Installing from the Standard Ubuntu repository – this involves using an
apt
command to install a stable version of Firefox. Use this method if you’re in a hurry or unsure of which method to use. - Installing from the Mozilla PPA repository. This is another command line method but it allows you to install more updated (and less stable, possibly) versions of Firefox directly from Mozilla’s repository. Use this method if you enjoy the bleeding edge.
- Installing from Firefox’s official website, Mozilla.org. We’ll show how to do this from the command line with
wget
, but you can also use this method if you want to avoid the command line and you already have a browser that can be used to navigate to Firefox’s website.
We’re going to show you the step by step for each of these methods, and regardless of which one you choose, you’ll be able to follow along with our instructions to update and uninstall Firefox as well.
First thing’s first. You should open a terminal and run a quick couple Linux commands to update your system’s apt index and see if a current version of Firefox is already installed on your system:
$ sudo apt update $ firefox --version
Check if Firefox is installed and what version it is
With that out of the way, it’s time to pick a method and follow one of the sections below to get Firefox installed or updated.
Install, update, and uninstall Firefox from Ubuntu repository
The following section will explain how to install, update, and uninstall Mozilla Firefox from the command line, using Ubuntu’s default package repository.
Install Firefox
If the Firefox browser isn’t already on your Ubuntu system for some reason, entering the following command in a terminal will download and install it:
$ sudo apt install firefox
Update Firefox
The same command will also update Firefox if it’s already installed:
$ sudo apt install firefox
However, if you want to update the browser, we’d recommend that you just upgrade your Ubuntu operating system entirely. This will update all of your installed packages rather than just the single Firefox package.
$ sudo apt upgrade
Uninstall Firefox
To uninstall Firefox from your system, we’ll use another apt
command. This command will remove Firefox from your system:
$ sudo apt remove firefox
Install, update, and uninstall Firefox from Mozilla PPA repository
The following section will explain how to install, update, and uninstall Mozilla Firefox from the command line, using the Mozilla developer PPA repository. Remember that this method will install the latest version of Firefox, even if it’s in beta and considered a little less than stable.
Install Firefox
- First, we need to add the Mozilla signing key to our system:$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys A6DCF7707EBC211F
- Next, add Mozilla’s PPA repository and update the list of available packages in
apt
:$ sudo apt-add-repository “deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu focal main” $ sudo apt update - Finally, if all went well up till now, install the latest version of Firefox with this command:$ sudo apt install firefox
Uninstall Firefox
You can still uninstall Firefox in the traditional way, with apt
at the command line:
$ sudo apt remove firefox
Install, update, and uninstall Firefox with direct download
The following section will explain how to install, update, and uninstall Mozilla Firefox from the command line, using the official Mozilla website. If you already have an alternative browser installed on your system and you’re not the type who likes to fiddle with the command line, remember that you can just navigate to Mozilla.org and download the installation file.
Install Firefox
- Use
wget
to download the latest version of Firefox directly from Mozilla’s website into your user’s home directory:$ wget -O ~/FirefoxSetup.tar.bz2 “https://download.mozilla.org/?product=firefox-latest&os=linux64” - Next, extract the Firefox package to your system’s
/opt/
directory:$ sudo tar xjf ~/FirefoxSetup.tar.bz2 -C /opt/ - It’s a good idea to 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
Firefox should now be installed and usable.
Update Firefox
To update your Firefox to the latest version, you just need to download the latest 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, just remove the /opt/firefox
directory that we created, and revert your system back to using the default version of Firefox that was installed from the Ubuntu repository:
$ sudo rm -fr /opt/firefox $ sudo mv /usr/lib/firefox/firefox_backup /usr/lib/firefox/firefox
Conclusion
In this article, we learned several methods for installing, updating, and uninstalling Mozilla Firefox on Ubuntu Linux. Whether you want to use Ubuntu’s default package repository, Mozilla’s developer PPA, or Firefox’s official website, managing Firefox on your Ubuntu system is easy to do when following along with our step by step instructions.
Related Linux Tutorials:
- Things to install on Ubuntu 20.04
- Things to do after installing Ubuntu 20.04 Focal Fossa Linux
- How to install, uninstall and update Firefox on Ubuntu 22.04…
- Things to install on Ubuntu 22.04
- How to list and remove PPA repository on Ubuntu 20.04 Linux
- Ubuntu 20.04 Guide
- Things to do after installing Ubuntu 22.04 Jammy Jellyfish…
- Ubuntu 20.04 Tricks and Things you Might not Know
- Ubuntu 22.04 Guide
- How to Remove Bloatware From Your Samsung Android Mobile…
CategoriesUbuntuTagsapplications, desktop, ubuntu, ubuntu 20.04Post navigation
Oracle Java installation on Ubuntu 20.04 Focal Fossa Linux
How to Rip CDs From the Linux Command Line
source : https://linuxconfig.org/how-to-install-uninstall-and-update-firefox-on-ubuntu-20-04-focal-fossa-linux