Last active
January 28, 2020 01:34
-
-
Save sharepointoscar/8f4b503537bdf794e221642f9c03b605 to your computer and use it in GitHub Desktop.
Removes all dangling Docker images
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
# delete docker images that are dangling | |
docker rmi $(docker images -f "dangling=true" -q ) --force | |
# delete images with the status 'exited' | |
docker rmi $(docker ps --all -f "status=exited" -q) | |
# A nice holistic cleanup approach named: Scorched Earth Cleanup. | |
# Kindly provided by James Todd (https://twitter.com/jwtodd) | |
alias drc='docker rm $(docker ps -a -q)' | |
alias dri='docker rmi $(docker images -a -q)' | |
alias drv='docker volume prune -f' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment