NetworkManager: Remove One Of Two DHCP Leases

Home » CentOS » NetworkManager: Remove One Of Two DHCP Leases
CentOS No Comments

I forgot to release the DHCP IPv4 lease on a PC before I deployed it at the customer site. So now the box has two leases for a couple days, when the old lease expires. What’s the proper way to force the unwanted additional lease to expire immediately? It’s mucking up my resolv.conf with the old DNS search order and servers added to the customer’s.

I checked the /var/lib/NetworkManager/dhclient6-*.lease file and see my own IPv6 configuration and nothing from the customer, which explains why I
can’t connect to resolved IPv6 addresses. How can I flush that? (There are two identical lease6 records but both are to my home LAN. Why are there two copies?)