How do I downgrade Firefox v. 57 to v. 56?

What is the most straight forward way to downgrade Firefox 57 to Firefox 56?

This is to have more time to wait for working replacements for legacy extensions.


Get supported Firefox ESR 60.x (LEGACY ADDONS do not work here)

If you need supported Firefox ESR then you can add one of the PPAs. Two options here:

  • Get Firefox ESR 60.x as snap:

    snap install --channel=esr/stable firefox
    
  • Get Firefox ESR 60.x from Mozilla Team's PPA ppa:mozillateam/ppa (the first versions were published here at 2017-10-11 as the result of discussion on the ubuntu-desktop maillist):

    sudo add-apt-repository ppa:mozillateam/ppa
    sudo apt-get update
    sudo apt-get install firefox-esr
    
  • Get Firefox ESR 60.x from Jonathon F's PPA ppa:jonathonf/firefox-esr.

    sudo add-apt-repository ppa:jonathonf/firefox-esr
    sudo apt-get update
    sudo apt-get install firefox-esr
    

For your information:

  • This new version does not support LEGACY ADDONS.
  • The current status of porting LEGACY extensions to WebExtension are located in Google Spreadsheet. The percentage of WebExtensions is not too high.

Get unsupported Firefox ESR 52.x (LEGACY ADDONS work here)

Please note that ESR 52 version is not supported anymore. Proceed on your own risk.

You can get Firefox ESR 52.9.0 from Jonathon F's PPA ppa:jonathonf/firefox-esr-52 with the following commands:

sudo add-apt-repository ppa:jonathonf/firefox-esr-52
sudo apt-get update
sudo apt-get install firefox-esr

With such version I can continue to use my add-ons such as SiteDelta, TableTools2, Show Parent Folder, Manage Folders, Wired Marker and others.


Notes: if you have already added ppa:jonathonf/firefox-esr PPA before and do not want Firefox to be upgraded to version 60, then you can pin this version with the following command (16.04 LTS as an example):

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-firefox
Package: firefox-esr
Pin: version 52.9.0esr-1~16.04.york0
Pin-Priority: 1337
EOF

If you have added any of PPAs (ppa:mozillateam/ppa or ppa:jonathonf/firefox-esr) and Firefox was upgraded from 52 to 60 then remove any PPA with version 60 and enable special one (ppa:jonathonf/firefox-esr-52) with the commands below:

sudo ppa-purge ppa:mozillateam/ppa
sudo ppa-purge ppa:jonathonf/firefox-esr
sudo add-apt-repository ppa:jonathonf/firefox-esr-52
sudo apt-get update
sudo apt-get install firefox-esr

but please note that you will not get security updates as this version is obsolete.

Update 2019-07-09: the Firefox ESR 52.9.0 version suffers from addon-problem with expired certificate. Even local XPI installation ends with "This add-on could not be installed because it appears to be corrupt." message. To fix the problem we need:

  1. Download updated PEM certificate from pastebin (or copy from this superuser answer and save as mozilla2019.pem.
  2. Navigate Firefox to about:preferences#advanced
  3. Click on "View Certificates" button, click "Import" and install mozilla2019.pem certificate.

Disclaimer:

It is not recommended to keep packages on hold unless your goal is to have a stable production environment where the tools you use should not undergo changes while you work with them.

For doing this you can simply do the following:

  1. For Ubuntu 17.10:

    Note: this works in artful all the time because artful got released with firefox being version 56.

    # see footnote (1)
    sudo apt-get install firefox=56.0+build6-0ubuntu1
    sudo apt-mark hold firefox
    
  2. For Ubuntu 16.04

    Note: this will only work on 16.04 if you did not clean out the cache of youre archives with sudo apt clean or sudo apt autoclean. If you already cleaned your local archives you can only revert to 45.0.2+build1-0ubuntu1 which was the one xenial got released with, alternatively you can refer to @Michael Johnson's answer below which will work fine in this case.

    # see footnote (1)
    sudo apt-get install firefox=56.0+build6-0ubuntu0.16.04.2
    sudo apt-mark hold firefox
    
  3. For all other Ubuntu versions:

    Note: Here as well it will only work if you not cleaned your local archives yet:

    request the apt policy information which will return you something like this:

    $ apt policy firefox
    firefox:
      Installed: 57.0+build4-0ubuntu0.17.10.5
      Candidate: 57.0+build4-0ubuntu0.17.10.5
      Version table:
     *** 57.0+build4-0ubuntu0.17.10.5 500
            500 http://archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
            500 http://archive.ubuntu.com/ubuntu artful-security/main amd64 Packages
         56.0+build6-0ubuntu1 500
            500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages
            100 /var/lib/dpkg/status
    

    We are after the line which tells you the package name for version 56, which would be in this example 56.0+build6-0ubuntu1. this you simply put into the following lines:

    # see footnote (1)
    sudo apt-get install firefox=<package version>
    sudo apt-mark hold firefox
    
  4. If all options above fail you can download older firefox versions on their website for all versions and set them up in your home directory. See How do I install a tar.gz or tar.bz2 file on how to do this. This would leave you with firefox 56 as a second option on your system while you wait for your favorite add-ons to be updated.

  5. Since I'm not want to plagiatize @Michael Johnson's answer you should refer to his answer for another fine option on how to revert back.

Whenever you feel you want to update this package again to 57 or whatever version is current then, you can simply do (see (2)):

sudo apt-mark unhold firefox
sudo apt update
sudo apt install firefox

When you start the downgraded firefox for the first time you might get a warning that some extensions (language) which are available in firefox 57 are not compatible with version 56. After one time checking those for updated versions, which will find none, firefox will start normally.


Footnotes:

(1) The first will install the last version of firefox 56, even if you have 57 already installed and the second command will block this package from updating (see (2)).

(2) Normally holding/unholding firefox alone suffices for what you want to achieve, but if in doubt holding/unholding 'firefox\*' will hold/unhold all additional packages beginning with firefox too.


The other answers do not currently work without reading the comments, so I think it is useful to post a more direct answer, since the OP asked for "the most straightforward way".

If you are still using Ubuntu 14.04 64 bits, just run these commands:

wget https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+build/13537990/+files/firefox_56.0+build6-0ubuntu0.14.04.2_amd64.deb
sudo apt install -Vy gdebi # gdebi lets you install local deb packages resolving and installing its dependencies.
sudo gdebi firefox_56.0+build6-0ubuntu0.14.04.2_amd64.deb
sudo apt-mark hold firefox

If you are using Ubuntu 16.04 64 bits just run these commands:

wget https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+build/13537983/+files/firefox_56.0+build6-0ubuntu0.16.04.2_amd64.deb
sudo dpkg -i firefox_56.0+build6-0ubuntu0.16.04.2_amd64.deb
sudo apt-mark hold firefox

If you are running instead Ubuntu 17.10 (32 or 64 bits), run these commands instead:

sudo apt-get install firefox=56.0+build6-0ubuntu1
sudo apt-mark hold firefox

If you are running some other version of Ubuntu, you'll have to hunt down the .deb here and install with dpkg as above.