Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,21 @@ alias clickpaste='sleep 3; xdotool type "$(xclip -o -selection clipboard)"'

alias kssh="kitty +kitten ssh"

# alias to cleanup unused docker containers, images, networks, and volumes
# alias to cleanup unused docker containers, images, networks, and volumes and includes the "nuke" option to cleanup active containers

alias docker-clean=' \
docker container prune -f ; \
docker image prune -f ; \
docker network prune -f ; \
docker volume prune -f '
docker volume prune -f ; \
if [ -n "$(docker images -aq)" ]; then \
docker rmi -f $(docker images -aq) ; \
fi ; \
read -p "Are you sure you want to remove ALL running containers? (y/n): " confirm; \
if [ "$confirm" = "y" ]; then \
docker rm -vf $(docker ps -aq); \
fi ; \
docker system prune -a -f'

#######################################################
# SPECIAL FUNCTIONS
Expand Down