pihole automatic log delete?

i have 1 question, does pihole delete automatic logs? if not how can I do that

Pi-hole employs log rotation for its own log files, so file size consumption is limited to the amount of data logged within whatever period you've configured. If you stick with the defaults, Pi-hole rotates its logs once a day, at midnight, and keeps logs for the last five days.

Be aware that other components of your system employ logging as well, just as any Linux system would. This especially includes logs generated by lighttpd, the web server Pi-hole uses by default.

For a list of files and locations (including logs) that Pi-hole is using or at least aware of (if not controlling them), refer to

This is our logrotate file:

Pi-Hole rotates logs nightly at midnight via a cron script installed by Pi-Hole.

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1703 Sep 15 18:12 /etc/cron.d/pihole
   ...
   00 00   * * *   root    PATH="$PATH:/usr/local/bin/" pihole flush once quiet
   @reboot root /usr/sbin/logrotate /etc/pihole/logrotate
   ...

The current day and previous day logs are uncompressed, and older logs (up to 5 days) are compressed.

-rw-r--r-- 1 pihole      pihole    916 Nov 15 10:00 pihole-FTL.log
-rw-r--r-- 1 pihole      pihole   1.7K Nov 15 00:00 pihole-FTL.log.1
-rw-r--r-- 1 pihole      pihole    837 Nov 14 00:00 pihole-FTL.log.2.gz
-rw-r--r-- 1 pihole      pihole    403 Nov 13 00:00 pihole-FTL.log.3.gz
-rw-r--r-- 1 pihole      pihole   1.7M Nov 15 10:07 pihole.log
-rw-r--r-- 1 pihole      pihole   4.0M Nov 15 00:00 pihole.log.1
-rw-r--r-- 1 pihole      pihole   283K Nov 14 00:00 pihole.log.2.gz
-rw-r--r-- 1 pihole      pihole   307K Nov 13 00:00 pihole.log.3.gz
-rw-r--r-- 1 pihole      pihole   296K Nov 12 00:00 pihole.log.4.gz
-rw-r--r-- 1 pihole      pihole   277K Nov 11 00:00 pihole.log.5.gz

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