Last active
November 23, 2023 04:45
-
-
Save verespej/c10681e0ddc3b36e7b63ff5f77775e71 to your computer and use it in GitHub Desktop.
Various commands for cleanup up docker
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
docker rm $(docker ps -aqf status=exited) # May want to also run for 'created' containers | |
docker rmi $(docker images -qf dangling=true) | |
docker volume rm $(docker volume ls -qf dangling=true) | |
# Untagged images | |
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment