Last active
October 16, 2019 01:46
-
-
Save rsmnarts/b330b5bb1a200f548022323f32b7d9af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: https://github.com/moby/moby/issues/23371#issuecomment-224927009 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To clear containers:
docker rm -f $(docker ps -a -q)
To clear images:
docker rmi -f $(docker images -a -q)
To clear volumes:
docker volume rm $(docker volume ls -q)
To clear networks:
docker network rm $(docker network ls | tail -n+2 | awk '{if($2 !~ /bridge|none|host/){ print $1 }}')