Created
February 16, 2019 05:04
-
-
Save s4mpl3d/f29873eb5f03abfd332e5554f386b398 to your computer and use it in GitHub Desktop.
delete all docker containers, images, networks and cache
This file contains hidden or 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
#!/bin/bash | |
# stop all containers | |
docker stop $(docker ps -a -q) | |
# WARNING! This will remove: | |
# - all stopped containers | |
# - all networks not used by at least one container | |
# - all images without at least one container associated to them | |
# - all build cache | |
docker system prune -a -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment