How do I revert to a previous version of Pi-hole?

if you want to run a different version of Pi-hole, it is possible to install an older version. Typically, we release all three components of Pi-hole at the same time (Core, Web, and FTL), so you'll usually want to install version from the same "release."

For example, we ran into some issues with v3.3 and dnsmasq compatibility with some systems, so some users needed to revert to v3.2.1 (Core and Web) but as part of the 3.2.1 "release," the latest version of FTL was 2.13.2.

Because we version each component of Pi-hole separately, you can checkout each version. The important thing to note is that you need to checkout FTL last because pihole -r tries to download the latest FTL.

So to revert to the 3.2.1 "release,":

cd /etc/.pihole
sudo git fetch --tags
sudo git reset --hard v3.2.1
cd /var/www/html/admin
sudo git fetch --tags
sudo git reset --hard v3.2.1
pihole -r
pihole checkout ftl v2.13.2

EDIT: 2018/02/07

If you had previously downloaded the v3.3 release, you may now have an extra line in your /etc/dnsmasq.d/01-pihole.conf, remove the line log-queries=extra as earlier versions of dnsmasq can not utilize the extra logging capabilities.

3 Likes

I appreciate the instructions on how to revert to a previous version. I had to do this after the most recent release because the Pi-hole dnsmasq stopped working. Since then, I have updated my OS (jessie) and would like to update to the latest version of Pi-hole again. However, because the Head is detached at v3.2.1 it will not update. Is there a set of commands that will allow me to update the latest version again? Here is what shows on the bottom of the Pi-hole Console page: Pi-hole Version vDev (HEAD, v3.2.1-0-ge602008) Web Interface Version vDev (HEAD, v3.2.1-0-g31dddd8) FTL Version vDev (v2.13.2, v2.13.2) Thanks!

You can switch back to the master branch with sudo git checkout master (instead of the sudo git checkout v3.2.1)

Afterwards I could update it to latest version. (maybe you run into this Updated to v3.3; web UI thinks CORE still at v3.2.1)

I tried what the OP suggested for downgrading Pi-Hole but I get this error whenever I run the checkout commands

error: pathspec 'v3.2.1' did not match any file(s) known to git.

Okay I found the solution!

First you have to run sudo git fetch --tags before the checkout commands.

1 Like

I have followed the instructions to go from 3.3 to 3.2.1 and it works! Got my pi-hole working again!

I did not have to remove the extra line in .conf file. I did not have log-queries=extra

3 Likes

How to do this on synology?

It should be the same...none of the devs have a Synology to test on however.

cd /etc/.pihole gives the error "no such file or directory"
so I believe the installation folder is different on synology... hence it doesn't work

It shouldn't be. Try pihole -r

I am not successful in getting the webGUI operational anymore using commands above. Port 53 is listening but not port 80. I suspect that some git changes happened preventing this from working properly. I get git errors and seems to be related to clone depth set by the git server.

Anyone know how to get v3.2.1 working again? v4 is radioactive for me now.

Thanks

Edit: turned out it was the bug where lighttpd failed due to a missing external.conf. It blows my mind how programmers let their programs fail so easily instead of 'test if exists or else touch file' and remove a ton of hassles and problems when their programs lack basic defaults. SMH

What version of lighttpd are you using? So far, it seems that the latest version of lighttpd has a bug/regression which causes that crash.

How to install Pi-hole v3.3.1 with Web Interface v3.3 and FTL v3.0 on a new system (fresh install, not reverting)?
I'm using a lot of wildcards. Transforming them into regex (Pi-hole v4.x) will impact performance.

I know I can preserve wildcard blocking in v4.x too, by putting the wildcards into another file (example: /etc/dnsmasq.d/88-wildcards.conf), but then I lose logging.

What leads you to believe this will be the case?

I have 100000+ wildcards. Most of them are from the notracking domain blocklist. Such large number of wildcards transformed into regex could be problematic.

Found this thread on github:

Possible solution for wildcard logging in v4.x?

Yes, these changes are already in the development version of pihole-FTL and will become available in Pi-hole v4.1.

1 Like

Your options appear to be (in what I believe would be the best first order):

  1. Keep running your existing address list as you propose, use V4 and don't convert them to regex. Live without logging until 4.1 (blocking still works properly).

  2. Move your Pi-Hole install to the development branch (with the attendant risks of using development code). You'll get the logging you are looking for.

  3. Revert to previous version - older code, not as fast, etc.

1 Like

I needed to check if the older version was better in terms of blocking ads with my regular expressions.
It now tells me
[i] FTL: up to date
[i] Warning: You are using FTL from a custom branch (v5.13) and might be missing future releases.

How do I get to remove this and let it go with the normal updates it finds? I get an update available in the admin space (cause there is the v5.14 available)

P.S.: there is something broken on pihole 5.9. I am reverting to 5.8.1 :confused: