Skip to content

Instantly share code, notes, and snippets.

@bolavefasfas
bolavefasfas / docker-gc.sh
Created August 27, 2022 00:12 — forked from ilagnev/docker-gc.sh
docker clean up stopped containers and remove unlinked images
#!/usr/bin/sh
# info
docker system df # Show docker disk usage, including space reclaimable by pruning
# automatic clean up
docker system prune # will delete ALL unused data
# (i.e. In order: containers stopped, volumes without containers and images with no containers)
# manual clean up
docker container prune # Remove all stopped containers