Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] resolv.conf full of old info
Date: Tue, 18 Oct 2022 22:21:55
Message-Id: tin8tm$179q$1@ciao.gmane.io
1 I've noticed that /etc/resolv.conf seems to accumulate obsolete,
2 useless info as my laptop moves from one network to another. It looks
3 like dhcpcd adds stuff when a connection comes up, but never removes
4 it when the connection goes down.
5
6 There are search entries and nameserver entries from networks I
7 haven't been connected to for a long time.
8
9 Even when there are no network interfaces up/configured,
10 /etc/resolv.conf is full of entries -- and none of them are useful or
11 valid.
12
13 I've tried shutting down all of the network interfaces, deleteting all
14 of the leases from /var/lib/dhcpcd and then removing resolv.conf. The
15 next time any interface comes up, /etc/resolv.conf is again full of
16 obsolete stuff along with the valid entries for the interface that has
17 just come up.
18
19 How do you get rid of old entries that show up in resolv.conf?

Replies

Subject Author
[gentoo-user] Re: resolv.conf full of old info Grant Edwards <grant.b.edwards@×××××.com>