mirror of
https://github.com/tedkulp/dotfiles
synced 2026-03-28 18:24:21 -04:00
12 lines
473 B
Bash
12 lines
473 B
Bash
# Kill all running containers.
|
|
alias dockerkillall='docker kill $(docker ps -q)'
|
|
|
|
# Delete all stopped containers.
|
|
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
|
|
|
|
# Delete all untagged images.
|
|
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
|
|
|
|
# Delete all stopped containers and untagged images.
|
|
alias dockerclean='dockercleanc || true && dockercleani'
|