My Pi-Hole is out of Space! How to free up space to upgrade.

Full of Ads and Malware

Even though I just recently upgraded my Pi-Hole configuration [Here], turns out there was another update to process this morning.  Yippee!

image

The process is to putty into the Pi server (mine is running on a $3 Pi Zero) and run the following command:

pihole -up

Unfortunately, I received a disk space issue.   I only have a small 8GB SD card so I have to manage the space accordingly.  Since the Pi-Hole is knocking down ads left and right, the database and log files grow pretty quickly.

My first step was to flush the Pi-Hole logs using the following command:

pihole flush
image

Once that was complete, I then deleted the log files in /var/log/

sudo rm pihole.log.*.*

In the FLT data base configuration file, I added the following parameter

MAXDBDAYS=14

in order to limit the growth of the Pi-Hole Database to 14 days.  This will help control how large the long term database will grow.

A quick reboot and then I processed the upgrade:

pihole –up
image
image

Pro Tip: If you are still having space issues, you can use the following command to hunt down the top 5 largest files.

 sudo find / -type f -exec du -Sh {} + | sort -rh | head -n 5

Happy Surfing!

Carlo

TAGS