Last active
January 27, 2020 12:21
-
-
Save sasajib/11b226e0e6394716ff89e3eb73fea880 to your computer and use it in GitHub Desktop.
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
#from post | |
#http://stackoverflow.com/questions/32723111/how-to-remove-old-and-unused-docker-images | |
#Delete stopped (exited) containers: | |
docker ps --no-trunc -aqf "status=exited" | xargs docker rm | |
#Delete unused (dangling) images: | |
docker images --no-trunc -aqf "dangling=true" | xargs docker rmi | |
#If you have exercised extreme caution with regard to irrevocable data loss, then you can delete unused (dangling) volumes (v1.9 and up): | |
docker volume ls -qf "dangling=true" | xargs docker volume rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment