Want to remove all logged data but not whitelist/blacklist

I want to clear all of the logged history not just the past 24 hours. I think I read that the current version keeps more than just history in /etc/pihole/pihole-FTL.db so I don't want to just delete that file. I looked at piholeLogFlush.sh and I edited line 61 from

deleted=$(sqlite3 "${DBFILE}" "DELETE FROM queries WHERE timestamp >= strftime('%s','now')-86400; select changes() from queries limit 1")

To

deleted=$(sqlite3 "${DBFILE}" "DELETE FROM queries WHERE timestamp >= strftime('%s','now')-31536000; select changes() from queries limit 1")

So that should remove the past year of data. I ran it but my /etc/pihole/pihole-FTL.db is still 114M.

Deleting the data will not free disk space. You would need a vacuum as well.
SQL will just overwrite deleted space with new data.

For some background see

Thanks for the link. So take no action. If I really want to, I can vacuum it.

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