docker network ls -q

Category: Docker

docker network ls -q

List network IDs only

Prints just the network IDs, one per line, ready to feed other commands. IDs are shorter than names and unique per network. The classic pattern is docker network rm $(docker network ls -q).
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.