# ~/.bash_aliases # Kill all running containers. alias dockerkillall='docker kill $(docker ps -q)' # Delete all stopped containers. alias dockercleanc='printf " >>> Deleting stopped containers " && docker rm $(docker ps -a -q)' # Delete all untagged images. alias dockercleani='printf " >>> Deleting untagged images " && docker rmi $(docker images -q -f dangling=true)' # Delete all stopped containers and untagged images. alias dockerclean='dockercleanc || true && dockercleani'