If, like me, you’ve also run out of room on your pi-hole running on a raspberry pi, here’s how you can clean up the database (note: all of the logged data will disappear forever!)
cd /etc/pihole sudo service pihole-FTL stop sudo mv pihole-FTL.db pihole-FTL.db.old sudo service pihole-FTL start