I've noticed that /etc/resolv.conf seems to accumulate obsolete,
useless info as my laptop moves from one network to another. It looks
like dhcpcd adds stuff when a connection comes up, but never removes
it when the connection goes down.

There are search entries and nameserver entries from networks I
haven't been connected to for a long time.

Even when there are no network interfaces up/configured,
/etc/resolv.conf is full of entries -- and none of them are useful or
valid.

I've tried shutting down all of the network interfaces, deleteting all
of the leases from /var/lib/dhcpcd and then removing resolv.conf. The
next time any interface comes up, /etc/resolv.conf is again full of
obsolete stuff along with the valid entries for the interface that has
just come up.

How do you get rid of old entries that show up in resolv.conf?



Reply via email to