How to switch Firefox on Linux from a ESR to the latest release

Ever wanted to switch FireFox on your Linux version (for example Debian) to the latest release but you wheren’t able because it was stuck on the ESR version?
Here is how to still switch to the latest and greatest release and return back if ever needed.

  1. Create a New Folder for the Latest Firefox:

    • Open a terminal window.
    • Run the following command to create a new directory for the latest Firefox:
      sudo mkdir /opt/firefox
      

  2. Backup the ESR Release:

    • Next, back up the existing ESR version of Firefox:
      sudo mv /usr/lib/firefox-esr/firefox-esr /usr/lib/firefox-esr/firefox-esr_orig
      

  3. Create a Symbolic Link to the Latest Firefox:

    • Now, create a symbolic link to the newly installed Firefox in the custom folder:
      sudo ln -s /opt/firefox/firefox/firefox /usr/lib/firefox-esr/firefox-esr
      

  4. Download and Install the Latest Firefox:

    • Download the latest Firefox release using the following command:
      wget -O FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
      

    • Extract the downloaded archive to the /opt/firefox/ directory:
      sudo tar xjf FirefoxSetup.tar.bz2 -C /opt/firefox/
      

  5. Verify the Installation:

    • Launch Firefox by typing firefox in the terminal.
    • Confirm that you’re using the latest version.
  6. Restore to the Old ESR Version (if needed):

    • To revert to the ESR version, remove the symbolic link:
      sudo unlink /usr/lib/firefox-esr/firefox-esr
      

    • Restore the original ESR binary:
      sudo mv /usr/lib/firefox-esr/firefox-esr_orig /usr/lib/firefox-esr/firefox-esr
      

That’s it! You’ve successfully switched to the latest Firefox release. Enjoy browsing! 🦊🌟

Remember to adjust the commands based on your specific Linux distribution and any customizations you might have. If you have any questions, feel free to ask! 😊