2 matches found based on name: network container-name_default is ambiguous

I ran into this the other day after I upgraded my docker instance and clearing out several containers. A quick google search lead me to this github issue, and I learned about the docker network command

2 matches found based on name: network container-name_default is ambiguous
$ docker-compose up
ERROR: 2 matches found based on name: network container-name_default is ambiguous

I ran into this the other day after I upgraded my docker instance and clearing out several containers. A quick google search lead me to this github issue, and I learned about the docker network command

$ docker network ls
NETWORK ID          NAME                     DRIVER              SCOPE
9839ffe1fd79        bridge                   bridge              local
d9c90e49aa35        container-name_default   bridge              local
a39b5440fb66        container-name_default   bridge              local
99fb77547915        host                     host                local
43e2df6e4d14        none                     null                local

You can see that I have two network bridges but no container running. Time to kill those. Take note of how I use the NETWORK ID and remove them.

$ docker network rm d9c90e49aa35 a39b5440fb66

and now my command works! YAY.