Deleting an IP address with ip address is useful when a temporary service address is no longer needed, when a wrong prefix was added to an interface, or when a host must stop answering on one address without disturbing the rest of the interface configuration.
The ip address delete action removes one configured IPv4 or IPv6 address from the running kernel network state immediately. The safest workflow is to inspect the interface first, copy the exact address and prefix length from the current output, and delete only that specific entry instead of flushing the whole interface.
The change takes effect at once and can drop SSH sessions, listener bindings, or policy-routing rules that depend on that address. Runtime deletion also does not update NetworkManager, systemd-networkd, netplan, or other persistent network configuration, so the same address can return after an interface reload or reboot unless the saved configuration is changed too.
Steps to delete an IP address with ip address:
- Show the current addresses on the target interface and identify the exact address and prefix that should be removed.
$ ip address show dev lab0 12: lab0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000 link/ether ea:05:5e:f8:fb:e7 brd ff:ff:ff:ff:ff:ff inet 192.0.2.10/24 scope global lab0 valid_lft forever preferred_lft forever inet 192.0.2.20/24 scope global secondary lab0 valid_lft forever preferred_lft forever - Delete the exact address and prefix from the interface.
$ sudo ip address delete 192.0.2.20/24 dev lab0
If the address is not installed with that exact prefix, ip returns
Error: ipv4: Address not found.
- Verify that only the target address is gone while the rest of the interface state remains.
$ ip address show dev lab0 12: lab0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc noqueue state UNKNOWN group default qlen 1000 link/ether ea:05:5e:f8:fb:e7 brd ff:ff:ff:ff:ff:ff inet 192.0.2.10/24 scope global lab0 valid_lft forever preferred_lft forever - Delete the 192.0.2.20/24 entry from the network service's saved settings if the address was configured there.
Netplan: the entry is a line under addresses: in a file in /etc/netplan, and sudo netplan apply loads the edited file.
NetworkManager: nmcli -g GENERAL.CONNECTION device show lab0 prints the profile name, sudo nmcli connection modify "<profile>" -ipv4.addresses 192.0.2.20/24 removes the entry (-ipv6.addresses for an IPv6 address), and sudo nmcli connection up "<profile>" reapplies the profile.
systemd-networkd: the entry is an Address= line in a .network file in /etc/systemd/network, and sudo networkctl reload loads the edited file.ip address delete changes only the running kernel state.