Created
March 4, 2019 16:36
-
-
Save amandoabreu/30560cab9156fb935a9fcd5e3a486620 to your computer and use it in GitHub Desktop.
Nuke docker containers, volumes, and all
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
$ docker system prune | |
This will remove: | |
- all stopped containers | |
- all volumes not used by at least one container | |
- all networks not used by at least one container | |
- all dangling images | |
As below, this is nuclear. | |
To clean your system, first remove containers | |
$ docker rm $(docker ps -aq) | |
then remove images | |
$ docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment