netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is the manpage wrong for "ip address delete"?
@ 2024-07-11 14:52 Adam Nielsen
  2024-07-12 10:33 ` Donald Hunter
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Nielsen @ 2024-07-11 14:52 UTC (permalink / raw)
  To: netdev

Hi all,

I'm trying to remove an IP address from an interface, without having to
specify it, but the behaviour doesn't seem to match the manpage.

In the manpage for ip-address it states:

    ip address delete - delete protocol address
       Arguments: coincide with the arguments of ip addr add.  The
       device name is a required  argument. The rest are optional.  If no
       arguments are given, the first address is deleted.

I can't work out how to trigger the "if no arguments are given" part:

  $ ip address delete dev eth0
  RTNETLINK answers: Operation not supported

  $ ip address delete "" dev eth0
  Error: any valid prefix is expected rather than "".

  $ ip address dev eth0 delete
  Command "dev" is unknown, try "ip address help".

In the end I worked out that "ip address flush dev eth0" did what I
wanted, but I'm just wondering whether the manpage needs to be updated
to reflect the current behaviour?

Cheers,
Adam.

(Not subscribed, please CC)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-25 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 14:52 Is the manpage wrong for "ip address delete"? Adam Nielsen
2024-07-12 10:33 ` Donald Hunter
2024-07-14  5:31   ` Stephen Hemminger
2024-07-15 10:32     ` Donald Hunter
2024-07-25 18:20   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).