Adlist editing, mistakenly added 000's of sites, not lists

Hi, I have a R-Pi 4 running Pi-Hole, all was well until I mistakenly added nearly 5,000 sites to the adlist, instead of adding lists, now gravity won´t work and it takes forever to delete each site.

How can I edit the adlist contents quickly without having to delete each one individually ?? I tried teleporter but all I get are .json files I have no idea how to use or edit.

How can I quickly edit the list without having to go through all 5,000 sites one by one, having to wait for the update.

Thanks

Manuel

This command from the Pi terminal will delete all your adlists at once. Then you can add back the lists you want.

sudo sqlite3 /etc/pihole/gravity.db "DELETE FROM adlist;"

Rebuild gravity at the end.

Thanks will give it a try

Something is not working, I get this error:

[✗] Unable to create new database /etc/pihole/gravity_temp.db
/opt/pihole/gravity.sh: line 344: /etc/.pihole/advanced/Templates/gravity.db.sql: No such file or directory

Gravity is not updating for some reason, I did what you recommended, all good, everything erased, added all my adlists again, some did not work, but still managed to add all the rest and now gravity won't update.

Run ls -lh /etc/.pihole/advanced/Templates and post the output. If it says no directory, try with ls -lh /etc/.pihole/advanced or ls -lh /etc/.pihole/ until you find something works

Somehow an integral part of your Pi-hole installation disappeared.

Hi, thanks I will post it, all I have done recently was upgrade to the latest version. BTW Coro you are in whonix as well right ??

[quote="Coro, post:5, topic:37863"]
ls -lh /etc/.pihole/advanced/Templates
[/quote] says no such file directory

[quote="Coro, post:5, topic:37863"]
ls -lh /etc/.pihole/advanced
[/quote] Screen Shot 2020-09-01 at 08.42.04

This is what I get for advanced, templates not there, what do you suggest doing next ??

Thanks

Manuel

No, I have no idea what "whonix" is :thinking:

cd /etc/.pihole
git status --verbose

Please generate a debug log, upload it when prompted and post the token here.

:/etc/.pihole $ git status --verbose
HEAD detached at v3.2.1
nothing to commit, working tree clean

This is the result.

Will do it now. Thanks

This is VERY old and outdated. This is at least several years old.

This explains why it did not work, the code is not even aware of the database. I don't understand how anything could have worked at all for you.

Does

pihole checkout master

fix it?

The Pi install is 6 months old tops, I ran the command but nothing happens,
pihole checkout master
/opt/pihole/piholeCheckout.sh: line 51: get_binary_name: command not found
pi@raspberrypi:~ $
is the result

Debug token?

https://tricorder.pi-hole.net/5swa2qi26n

You have a mismatch among the Pi-hole parts (three parts). In particular, your core version is quite old and on a different branch then the rest of the install. With one part of Pi-hole being on a different version, the three parts won't work together properly.

*** [ DIAGNOSING ]: Core version
[i] Core: v3.2.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/pi-hole.git (fetch)
             origin	https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: HEAD (https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#checkout)
[i] Commit: v3.2.1-0-ge602008

*** [ DIAGNOSING ]: Web version
[i] Web: v5.1.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/AdminLTE.git (fetch)
             origin	https://github.com/pi-hole/AdminLTE.git (push)
[i] Branch: master
[i] Commit: v5.1.1-0-ga03d1bd

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v5.2

These commands should clear your local files and get you on the latest master branch:

cd /
sudo rm -rf /etc/.pihole
sudo git clone https://github.com/pi-hole/pi-hole /etc/.pihole
1 Like

Running gravity once more, will let you know how it all goes, thanks !!!

Please generate a fresh debug log and post the token.

https://tricorder.pi-hole.net/8dwkvjpqtz

seems to be working now

btw thanks for the help, let me know if there's anything else I should do

thanks

Manuel

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.