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 - Remove the same address from the persistent network configuration if it should stay absent after the next reload or reboot.
ip address delete changes only the running kernel state.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
