Install Firefox as a DEB App on Ubuntu 24.04/22.04 LTS

This guide shows you how to install Firefox as a classical DEB application on Ubuntu 24.04 or 22.04 LTS versions from Mozilla's official repository.

Great news for Ubuntu users! Mozilla has just launched an official repository for you to download and install the Firefox browser as a native application easily. This is a fantastic option, especially if you’re looking for an alternative to the default Snap package version of Firefox that comes by default with Ubuntu.

But before proceeding, let’s clarify why this new option might be better for you.

  • Enhanced Performance: With over 25 years of expertise, Mozilla’s deep knowledge of Firefox enables it to optimize its performance using advanced techniques. Remember, using other DEB packages might mean missing out on these enhancements.
  • Prompt Updates: Stay up-to-date effortlessly with Firefox. Mozilla’s new APT repository links directly to their release cycle, bringing you the latest features and security updates faster.
  • Mozilla’s Own Build: Firefox from Mozilla’s repo is 100% made by Mozilla! This means you get an unmodified directly-from-the-source Firefox.

Now that we’ve cleared things up, we can proceed to the main subject of this guide: installing Firefox as a traditional DEB application on Ubuntu 24.04 (Noble Numbat) or 22.04 (Jammy Jellyfish) LTS versions. The first thing we’ll need to do is remove its Snap version.

Remove Ubuntu Firefox’s Snap Version

You might have checked out some other guides before finding ours. However, some of them sometimes miss a crucial step before installing the DEB version of Firefox on Ubuntu: removing the current Snap one. But if you overlook this step, though, you’ll end up with this:

Ubuntu 24.04 LTS with a duplicated Firefox app installed.
Ubuntu 24.04 LTS with a duplicated Firefox app installed.

In other words, it means having two identical versions of the same app. To avoid this situation, first, you must uninstall the Snap version of Firefox, which is quite simple. Open your Terminal application and run the following command.

sudo snap remove --purge firefoxCode language: Bash (bash)
Remove Ubuntu Firefox's Snap version.

Alright, we’re all done saying farewell to the Firefox Snap version. Next up, let’s switch gears and install Firefox as a native DEB application on our Ubuntu 24.04 system.

Install Firefox as DEB on Ubuntu 24.04/22.04 LTS

Import Mozilla Repo’s Key

Let’s first add the Mozilla APT repository signing key to get started. This is essential because it confirms that the software we’re installing is genuinely from Mozilla. It’s like getting a seal of approval for its authenticity, reliability, and safety.

So, first, let’s pull it out and put it in its proper place.

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/nullCode language: Bash (bash)
Import the Mozilla APT repository signing key.

As you can see, the command didn’t produce any output, but no worries, that’s completely normal. Let’s keep going!

Next, let’s do the import itself:

gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'Code language: Bash (bash)
Import the Mozilla APT repository signing key.

You should get the fingerprint “35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3,” which guarantees you that the key you’ve imported is authentic.

Add the Firefox Repo to your Ubuntu 24.04/22.04 System

Let’s go ahead and add Mozilla’s official repository, hosting the DEB packages we need to install Firefox, to our Ubuntu system. The command below (again) won’t produce any visible results.

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/nullCode language: Bash (bash)
Add the Firefox repo to your Ubuntu 24.04 system.

Prioritize Mozilla’s Repo

Let’s take a moment to understand why it’s important for us to give priority to the new Mozilla repository we’ve added and what this really involves. We like to do things this way, ensuring everything is clear before proceeding to the next step.

In Ubuntu, the APT command handles packages, including installing, updating, and removing software. But sometimes, multiple repositories are added to your system that provide different versions of the same package, as is the case with Firefox.

In other words, the browser is now available from our newly added Mozilla repository. Plus, it’s also in the Ubuntu one as a Snap package. Here’s a fun fact: if you type “apt install firefox” now, you’ll end up downloading and installing its Snap version. But that’s not what you’re looking for!

To avoid this, we’ll use a mechanism called “pinning” in APT. We must tell APT to prioritize the Mozilla repository as the first option when installing Firefox. Copy the snippet below and execute it in the terminal:

echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozillaCode language: Bash (bash)
Prioritize Mozilla's repo.

This way, you’re essentially saying, “Hey APT, I trust and prefer this repository more, so please use packages from here whenever possible.”

Install Firefox from Mozilla’s Repo on Ubuntu 24.04/22.04 LTS

It’s time to reap the rewards of our hard work. Let’s refresh our list of software, and you’ll be pleased to find that it now includes our newly added Mozilla repository.

sudo apt updateCode language: Bash (bash)
Install Firefox from Mozilla's repo on Ubuntu 24.04 LTS.

Finally, go ahead and install Firefox in the usual way by executing the following command:

sudo apt install firefoxCode language: Bash (bash)
Install Firefox from Mozilla's repo on Ubuntu 24.04 LTS.

Once the installation is finished, go to the GNOME dash and type “firefox” to find it. Then, youโ€™re all set to launch and enjoy it in its most up-to-date version!

Launching Mozilla Firefox on Ubuntu 24.04 LTS.
Mozilla Firefox was installed and run on Ubuntu 24.04 LTS as a native DEB app.
Mozilla Firefox was installed and run on Ubuntu 24.04 LTS as a native DEB app.

Conclusion

Installing Firefox as a native DEB application on Ubuntu 24.04 LTS or 22.04 LTS from Mozilla’s official repository means, above all, that you are using a version of the browser in its purest form, directly delivered by its developers that is fully supported and regularly updated.

The best part is that you get enhanced performance compared to the Snap version. In addition, by following this guide, you’ve learned how to install Firefox more traditionally and arguably efficiently and gained some insight into the workings of Ubuntu’s package management system.

Our guide on the subject is here if youโ€™d like to do the same with the Thunderbird mail client, which also comes by default as a Snap app in Ubuntu 24.04.

So, enjoy your newly installed Firefox and its improved web experience. Thanks for your time, and happy browsing! Your feedback and comments are, as always, most welcome.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%