Rasberry PiHole Commands
The Pihole database will become full after a period of time and will take up the pihole space to where you can’t perform updates. You will need to delete the database to make space.
#stops and delete db and starts back the service
sudo service pihole-FTL stop
sudo rm /etc/pihole/pihole-FTL.db
sudo service pihole-FTL start
Flushes the pihole.log file in /var/log/pihole.log
pihole flush
Remove all .gz files from /pihole directory
sudo rm -rf /var/log/pihole/*.gz
List all files in that directory that begin with pihole
#List all files
ls -la /var/log/pihole*
Command use to check the current size of the root directory
#Check disk usage size on root dorectory
du -chd1 /
The journal log located at /var/log/journal will need to be rotated and cleared. More info on the journal file can be found at the link below.
How to Clear Systemd Journal Logs in Linux
#View the size of the directory
du -sh /var/log/journal
#rotate journal files. This will mark the currently active journal logs as archive and create fresh new logs
sudo journalctl --rotate
#Clear journal log older than 2days
sudo journalctl --vacuum-time=2d