Ubuntu ships Firefox as a Snap rather than a regular .deb package. Since Ubuntu 22.04, running apt install firefox only pulls in a small package that installs the Snap, so getting a real .deb build of Firefox takes a different package source.

Early Firefox Snap builds could not install GNOME extensions from the browser, which was a common reason to switch. The Snap has since gained support for this through a desktop portal, so the choice now comes down to preference: a .deb build updates through apt with the rest of the system and runs outside Snap confinement.

The Mozilla Team Personal Package Archive (PPA) publishes Firefox .deb builds for Ubuntu 22.04 and later. Ubuntu's own firefox package has a higher version number than the PPA build, so apt has to be told to prefer the PPA or it keeps choosing the Snap installer.

Steps to install latest Mozilla Firefox .deb with PPA in Ubuntu:

  1. Remove existing Firefox to avoid confusion (optional).
    $ sudo snap remove firefox
    [sudo] password for user: 
    firefox removed
  2. Add new PPA repository for apt from Mozilla Team.
    $ sudo add-apt-repository --yes ppa:mozillateam/ppa
    PPA publishes dbgsym, you may need to include 'main/debug' component
    Repository: 'deb https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/ jammy main'
    Description:
    Mozilla Team's Firefox stable + 102 ESR and Thunderbird 102 stable builds
    
    Support for Ubuntu 16.04 ESM is included.
    More info: https://launchpad.net/~mozillateam/+archive/ubuntu/ppa
    Adding repository.
    Adding deb entry to /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-jammy.list
    Adding disabled deb-src entry to /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-jammy.list
    Adding key to /etc/apt/trusted.gpg.d/mozillateam-ubuntu-ppa.gpg with fingerprint 0AB215679C571D1C8325275B9BDB3D89CE49EC21
    ##### snipped 
  3. Prioritize PPA for firefox* packages.
    $ echo 'Package: firefox*
    Pin: release o=LP-PPA-mozillateam
    Pin-Priority: 501' | sudo tee -a /etc/apt/preferences.d/mozillateamppa

    Higher Pin-Priority value needs to be given to this PPA to avoid apt installing Firefox from Snap packages.

  4. Update apt's package list.
    $ sudo apt update
  5. Install Firefox using apt.
    $ sudo apt install --assume-yes firefox
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
      xul-ext-ubufox
    Suggested packages:
      fonts-lyx
    The following NEW packages will be installed:
      firefox xul-ext-ubufox
    0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
    Need to get 58.6 MB of archives.
    After this operation, 209 MB of additional disk space will be used.
  6. Confirm Firefox in default path is not from snap.
    $ which firefox
    /usr/bin/firefox
Share this guide