6

I am using Ubuntu 24.04 and would like to install Firefox directly from the official Mozilla repository instead of the default Ubuntu Snap/PPA repositories.

1 Answers1

14

To install Firefox from the official Mozilla repository on Ubuntu 24.04, follow these steps:

  1. Install the repository key:

    wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | gpg --dearmor | sudo tee /etc/apt/keyrings/packages.mozilla.org.gpg > /dev/null
    
  2. Create a deb822-formatted .sources file in /etc/apt/sources.list.d/mozilla.sources with the following content:

    Types: deb
    URIs: https://packages.mozilla.org/apt
    Suites: mozilla
    Components: main
    Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpg
    
  3. Set the apt repository priority by creating/editing the file /etc/apt/preferences.d/mozilla with the following content:

    Package: firefox*
    Pin: origin packages.mozilla.org
    Pin-Priority: 1001
    
  4. Allow unattended upgrades for the mozilla repository by creating/editing the file /etc/apt/apt.conf.d/51unattended-upgrades-firefox with the following content:

    Unattended-Upgrade::Origins-Pattern { "archive=mozilla"; };
    
  5. Remove the snap and apt installation of Firefox:

    sudo snap remove firefox
    sudo apt remove firefox
    
  6. Update the package list:

    sudo apt update
    
  7. Install Firefox from the Mozilla repository:

    sudo apt install firefox
    
  8. (Optional) Install additional translations with the packages firefox-l10n-XX where XX is the language identifier (e.g. firefox-l10n-it for Italian).

    sudo apt install firefox-l10n-XX
    

By following these steps, you should have Firefox installed from the official Mozilla repository on your Ubuntu 24.04 system.