Categories
SysOps

How to clear Pi-hole audited domains list

Alter or clear audited domains list on Pi-hole instance.

You can mark domains as audited to simply hide these, but there is no web interface to manage domains that have been already audited.

Alter database directly

Inspect table that stores audited domains.

dietpi@DietPi:~$ sqlite3 /etc/pihole/gravity.db ".schema domain_audit"
CREATE TABLE domain_audit
(
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        domain TEXT UNIQUE NOT NULL,
        date_added INTEGER NOT NULL DEFAULT (cast(strftime('%s', 'now') as int))
);

Display audited domains.

dietpi@DietPi:~$ sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domain_audit" 
incoming.telemetry.mozilla.org
trello.com

Delete specific domain.

dietpi@DietPi:~$ sudo sqlite3 /etc/pihole/gravity.db "DELETE FROM domain_audit where domain='trello.com'"

Delete all domains.

dietpi@DietPi:~$ sudo sqlite3 /etc/pihole/gravity.db "DELETE FROM domain_audit"

Alter database using pihole utility

Add an audited domain.

dietpi@DietPi:~$ pihole -a audit trello.com

Clear audited domains list.

dietpi@DietPi:~$ pihole -a clearaudit