DHCP Server - how to release leases?


I set up some dozen discharged laptops from my company for pupils of our local school. The laptops were dedicated as “give-aways” for home education to access school’s Moodle platform. Consequently I had to install each on its own not using AD / GPO features. During installation, each of these laptops was in my private LAN / WLAN. This exhausted my DHCP pool :slight_smile: However there are quite a lot of systems online within the pool I do not want to lose.

Is there a simple command to flush the pool and to remove all leases with no active MAC in the background. However, I just want to flush the DHCP pool (in my case from x.y.z.200 - x.y.z.240) while maintaining other active devices.


Unless you have overridden it or the client does, the default lease time is only an hour, so they would be released after that.

Another way would be to temporarily shut down dnsmasq, remove the entries from /var/lib/dnsmasq/dnsmasq.leases and then re-start dnsmasq.