{"id":38449,"date":"2022-04-06T16:21:18","date_gmt":"2022-04-06T16:21:18","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=38449"},"modified":"2026-04-08T11:22:57","modified_gmt":"2026-04-08T11:22:57","slug":"install-firefox-deb-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/04\/install-firefox-deb-ubuntu-22-04\/","title":{"rendered":"How to Install Firefox as classic Deb in Ubuntu 26.04, 24.04, 22.04"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-34790\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-250x250.png\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p><b>Ubuntu since 22.04 has Firefox web browser pre-installed as Snap package that runs in sandbox. While, the native <code>.deb<\/code> package in system repository is just an empty wrapper.<\/b><\/p>\n<p>If you prefer the <code>.deb<\/code> package, then here&#8217;s how to install it back in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 26.04 via the 2 ways below:<\/p>\n<p><!--more--><\/p>\n<ul>\n<li><b>Mozilla Team PPA<\/b> maintained by Ubuntu Team members.<\/li>\n<li><b>Mozilla&#8217;s new apt repository<\/b> maintained by Firefox developer team!<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50914\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox149-deb-700x429.webp\" alt=\"\" width=\"610\" height=\"374\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox149-deb-700x429.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox149-deb-300x184.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox149-deb-768x471.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox149-deb.webp 1300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h3>Remove the pre-installed Firefox Snap package (Optional)<\/h3>\n<p><b>NOTE: Export bookmarks and backup other important data before removing it!<\/b><\/p>\n<p>It&#8217;s OK to keep the default Snap package. But it will cause duplicated Firefox icons in app launcher after installed .deb version.<\/p>\n<p>To remove it, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. Then, run the command:<\/p>\n<pre>sudo snap remove --purge firefox<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50915\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/snapremove-firefox2604-700x453.webp\" alt=\"\" width=\"610\" height=\"395\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/snapremove-firefox2604-700x453.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/snapremove-firefox2604-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/snapremove-firefox2604.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p><b>Also, remove the empty Deb package by running command:<\/b><\/p>\n<pre>sudo apt remove firefox firefox-locale-*<\/pre>\n<h3>Option 1: Install Firefox via \u201cMozilla Team\u201d team PPA<\/h3>\n<p><a href=\"https:\/\/launchpad.net\/~mozillateam\" target=\"_blank\" rel=\"noopener\">The team<\/a> described that it has assumed responsibility for Ubuntu&#8217;s official Firefox and Thunderbird packages.<\/p>\n<p>And, the Firefox and Firefox ESR package maintainer for <a href=\"https:\/\/launchpad.net\/~mozillateam\/+archive\/ubuntu\/ppa\" target=\"_blank\" rel=\"noopener\">\u201cMozilla Team\u201d team PPA<\/a>, Rico Tzschichholz, is a well-known Ubuntu user who also maintains the official packages for LibreOffice, Plank dock, and unbound DNS server.<\/p>\n<h4>1. Add Mozilla Team PPA<\/h4>\n<p>In terminal (Ctrl+Alt+T), run the command below to add the PPA. Type user password (no asterisk feedback) when it asks and hit Enter to continue.<\/p>\n<pre>sudo add-apt-repository ppa:mozillateam\/ppa<\/pre>\n<p>As the PPA description indicates, the PPA was previously created for Firefox ESR and Thunderbird. It now contains the latest Firefox too.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50916\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-ppa2604-700x453.webp\" alt=\"\" width=\"610\" height=\"395\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-ppa2604-700x453.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-ppa2604-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-ppa2604.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4>2. Set PPA priority:<\/h4>\n<p>The empty Firefox deb in Ubuntu&#8217;s official repository has version number <b>1:1snap1-0ubuntu2<\/b>. Which is always higher than the PPA package version. Installing package updates either via <code>sudo apt upgrade<\/code> or &#8216;Software Updater&#8217; will automatically install that one which redirects to Snap.<\/p>\n<p>To workaround the issue, you have to set a higher PPA priority. To do so, run the command below in terminal (Ctrl+Alt+T):<\/p>\n<pre>sudo gnome-text-editor \/etc\/apt\/preferences.d\/mozillateamppa<\/pre>\n<p><strong>For Ubuntu 22.04 and earlier, replace <code>gnome-text-editor<\/code> in command with <code>gedit<\/code>, or use <code>nano<\/code> that works in all the desktop environments.<\/strong><\/p>\n<p>The command creates and opens empty config file for apt package manager. When it opens, add the lines below and save it:<\/p>\n<blockquote><p>Package: firefox*<br \/>\nPin: release o=LP-PPA-mozillateam<br \/>\nPin-Priority: 1001<\/p>\n<p>Package: firefox*<br \/>\nPin: release o=Ubuntu<br \/>\nPin-Priority: -1<\/p><\/blockquote>\n<p><i>For nano text editor, press <b>ctrl+s<\/b> to save file, and <b>ctrl+x<\/b> to exit.<\/i><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50917\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillapriority-2604-700x375.webp\" alt=\"\" width=\"610\" height=\"327\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillapriority-2604-700x375.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillapriority-2604-300x161.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillapriority-2604-768x412.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillapriority-2604.webp 823w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>After saving the file, run <code>sudo apt update<\/code> command in terminal to apply changes.<\/p>\n<pre>sudo apt update<\/pre>\n<h4>3. Install Firefox via apt<\/h4>\n<p>Tip: the commands in this step also installs Firefox for the old Ubuntu 16.04. Though <code>sudo apt update<\/code> need to be run first.<\/p>\n<p>Finally, run the command below to install the latest Firefox package as deb:<\/p>\n<pre>sudo apt install firefox<\/pre>\n<p><del>Here <code>-t 'o=LP-PPA-mozillateam'<\/code> specifies to install Firefox from that PPA. It&#8217;s required until you set higher PPA package priority (<i>see next step<\/i>).<\/del><\/p>\n<p>The <code>-t 'o=LP-PPA-mozillateam'<\/code> flag is no longer required after setup PPA priority.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50918\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-ffdeb2604-700x530.webp\" alt=\"\" width=\"610\" height=\"462\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-ffdeb2604-700x530.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-ffdeb2604-300x227.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-ffdeb2604.webp 732w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>For choice, you may install Firefox ESR instead. It&#8217;s another official Firefox package that moves slowly and targets for school or enterprise use.<\/p>\n<pre>sudo apt install firefox-esr<\/pre>\n<h3>Option 2: Install Firefox via its official repository<\/h3>\n<p>Mozilla&#8217;s new apt repository contains 4 versions of Firefox packages: Firefox Stable, Firefox Beta, Firefox Development Edition, and Firefox Nightly. It&#8217;s a good choice for Ubuntu &amp; Debian users.<\/p>\n<h4>1: Get Repository Key file<\/h4>\n<p>To add the new repository, you need to first download &amp; install the key, so your system will trust the packages from it.<\/p>\n<p>First, press <code>Ctrl+Alt+T<\/code> on keyboard to open terminal. When it opens, run command to make sure &#8216;\/etc\/apt\/keyrings&#8217; exist for storing the keys.<\/p>\n<pre>sudo mkdir -p \/etc\/apt\/keyrings<\/pre>\n<p>Then, download &amp; install the key by running the single command below in terminal:<\/p>\n<pre>wget -q https:\/\/packages.mozilla.org\/apt\/repo-signing-key.gpg -O- | sudo tee \/etc\/apt\/keyrings\/packages.mozilla.org.asc &gt; \/dev\/null<\/pre>\n<p>After that, you can verify the new key file by listing the content of that directory via command <code>ls \/etc\/apt\/keyrings<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50919\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox-key2604-700x343.webp\" alt=\"\" width=\"610\" height=\"299\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox-key2604-700x343.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox-key2604-300x147.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/firefox-key2604.webp 726w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4>2: Add Mozilla&#8217;s apt repository<\/h4>\n<p>Also in a terminal window, run the single command below will create a config file and edit it via nano command line text editor.<\/p>\n<pre>sudo nano \/etc\/apt\/sources.list.d\/mozilla.sources<\/pre>\n<p>When file opens (in terminal), copy&#8217;n&#8217;paste (Ctrl+Shift+V) following lines:<\/p>\n<pre>Types: deb\r\nURIs: https:\/\/packages.mozilla.org\/apt\r\nSuites: mozilla\r\nComponents: main\r\nSigned-By: \/etc\/apt\/keyrings\/packages.mozilla.org.asc<\/pre>\n<p>Finally, press Ctrl+S to save and Ctrl+X to exit the nano text editor.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50920\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-aptrepo2604-700x541.webp\" alt=\"\" width=\"610\" height=\"471\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-aptrepo2604-700x541.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-aptrepo2604-300x232.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-aptrepo2604-768x593.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozilla-aptrepo2604.webp 830w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4>3. Set apt repository priority:<\/h4>\n<p>Also you need to set higher priority for the Mozilla&#8217;s repository, so Ubuntu will install Firefox from it rather than the snap package.<\/p>\n<p>To do so, run command to create &amp; edit the config file:<\/p>\n<pre>sudo gnome-text-editor \/etc\/apt\/preferences.d\/mozilla<\/pre>\n<p><strong><i>Also, replace <code>gnome-text-editor<\/code> with <code>gedit<\/code> for Ubuntu 22.04 and earlier, or use <code>nano<\/code> command line editor that works in most desktop environments.<\/i><\/strong><\/p>\n<p>When file opens, add following lines and save it (<i>For nano, press ctrl+s to save, and <code>ctrl+x<\/code> to exit<\/i>).<\/p>\n<blockquote><p>Package: firefox*<br \/>\nPin: origin packages.mozilla.org<br \/>\nPin-Priority: 1001<\/p>\n<p>Package: firefox*<br \/>\nPin: release o=Ubuntu<br \/>\nPin-Priority: -1<\/p><\/blockquote>\n<p>The priority values tell to prefer Firefox package from Mozilla repository, and prevent auto-install the one from Ubuntu repository.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50921\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillarepo-priroty2604-700x354.webp\" alt=\"\" width=\"610\" height=\"308\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillarepo-priroty2604-700x354.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillarepo-priroty2604-300x152.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillarepo-priroty2604-768x388.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/mozillarepo-priroty2604.webp 867w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4>4. Install Firefox:<\/h4>\n<p>Finally, refresh your system package cache by running command in terminal:<\/p>\n<pre>sudo apt update<\/pre>\n<p>And, install Firefox from that repository via command:<\/p>\n<pre>sudo apt install firefox<\/pre>\n<p><i>You may also use <code>firefox-beta<\/code>, <code>firefox-devedition<\/code>, or <code>firefox-nightly<\/code> in last command to install other versions.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50922\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-mozillafirefox2604-700x268.webp\" alt=\"\" width=\"610\" height=\"234\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-mozillafirefox2604-700x268.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-mozillafirefox2604-300x115.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/apt-mozillafirefox2604.webp 726w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h3>How to Restore Firefox Snap:<\/h3>\n<p>To restore the pre-installed Snap package, or uninstall the <code>.deb<\/code> package, first remove the repositories:<\/p>\n<ul>\n<li>To remove the Mozilla Team PPA, either launch &#8216;<b>Software &amp; Updates<\/b>&#8216; utility and delete the source line under <i>Other Software<\/i> tab, or run the command below in terminal:\n<pre>sudo add-apt-repository --remove ppa:mozillateam\/ppa<\/pre>\n<\/li>\n<li>To remove the Mozilla apt repository, simply delete the source and key files, by running command in terminal:\n<pre>sudo rm \/etc\/apt\/sources.list.d\/mozilla.sources \/etc\/apt\/keyrings\/packages.mozilla.org.asc<\/pre>\n<\/li>\n<\/ul>\n<p>Also remove the configuration file that changed the pin-priority by running command:<\/p>\n<pre>sudo rm \/etc\/apt\/preferences.d\/mozilla \/etc\/apt\/preferences.d\/mozillateamppa<\/pre>\n<p>After that, either launch <b>Software Updater<\/b> to upgrade Firefox or use apt commands below. Both of which will automatically install back the pre-installed Snap package.<\/p>\n<pre>sudo apt update<\/pre>\n<pre>sudo apt install firefox<\/pre>\n<p>That&#8217;s all. Enjoy!<\/p>","protected":false},"excerpt":{"rendered":"<p>Ubuntu since 22.04 has Firefox web browser pre-installed as Snap package that runs in sandbox. While, the native .deb package in system repository is just an empty wrapper. If you prefer the .deb package, then here&#8217;s how to install it back in Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 26.04 via the 2 ways below:<\/p>\n","protected":false},"author":1,"featured_media":34790,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1194],"class_list":["post-38449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-firefox"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/38449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=38449"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/38449\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34790"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=38449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=38449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=38449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}