How to delete clients with infinite remaining lease time in Pi-hole's DHCP server?

Please follow the below template, it will help us to help you!

My Expected Behaviour:

Being able to delete clients with infinite remaining lease time somehow.

My Actual Behaviour:

Being stuck due to knowing how to do it.

Debug Token:

I assume this is not necessary.

There should be a /etc/pihole/dhcp.leases file you can modify.

I can access the file via nano but cannot see its content. Do I have to stop dnsmasq first - and if so, how do I do that?

Did you access it with sudo?

1 Like

EDIT: Unfortunately it only worked temporarily with sudo. At least I could access the file that way. Thanks!

Oh well. For some reason the old dhcp.leases entries reappear even with sudo. Weird. Any clue as to why?

Have you changed the lease time in the settings page?

Yes. It is back to 24 hours (from inifinite).

@Mcat12
I still wonder how to clean the DHCP client list for good. Any ideas?

Did you modify the leases file only after stopping dnsmasq? If you don't stop the server, it won't forget the leases.

sudo service dnsmasq stop
sudo rm /etc/pihole/dhcp.leases
sudo service dnsmasq start
2 Likes

It worked for me with the following commands.

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