How do I remove a bridge that has an IP address that was brought up manually and isn't in /etc/network/interfaces?

$ ifconfig br100                                                
    br100     Link encap:Ethernet  HWaddr 00:00:00:00:00:00                         
              inet addr:172.16.0.5  Bcast:172.16.0.255  Mask:255.255.255.0

Can't delete it:

# brctl delbr br100
bridge br100 is still up; can't delete it   

Can't bring it down with ifdown:

# ifdown br100                                                  
ifdown: interface br100 not configured     
  • 4
    Tried ifconfig br100 down? – user13742 Feb 15 '12 at 16:15
up vote 71 down vote accepted

Figured it out:

# ip link set br100 down
# brctl delbr br100

To clarify this for future.

ifup and ifdown are commands from some flavours of linux. And are used to control network settings set in /etc/network/interfaces for debian based systems and /etc/sysconfig/network-scripts/ifcg* on Redhat based systems (I cannot comment on others).

Creating and removing interfaces manually is done by using ifconfig (or ip which is bit more tricky to use). Bridges can be controlled with brctl

So after removing all interfaces from a bridge with brctl delif <bridg> <if> it can be moved to "down state" with ifconfig br100 down (or ip link set br100 down) and can now be removed with brctl delbr br100

Please note that using network-manager to manage your networks might make your manually changed interfaces to reset.

On macOS and possibly some BSD systems:

sudo ifconfig [bridge-name] down
sudo ifconfig [bridge-name] destroy
$ sudo ip link delete br0 type bridge

that's all

  • 2
    That is if you are on a system with iproute2 like e.g. GNU/Linux distributions. – phk Nov 19 '16 at 15:53

First you need to delete all the interfaces linked to your bridge using this command

ovs-vsctl del-port br-ex INTERFACE_NAME

Then you can delete the bridge

ovs-vsctl del-br br-ex

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.