ip addr flush dev eth0

Category: Local Network & Public Hosting

ip addr flush dev eth0

Remove every IP address from an interface

This clears all IPv4 and IPv6 addresses assigned to eth0 in one shot, leaving the interface up but with no addressing, which drops every connection through it. Scope the flush with a subnet, for example ip addr flush dev eth0 scope global, to keep link-local addresses. The addresses return only if DHCP or NetworkManager reassigns them.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.