Return String

Docker Frustration Cheatsheet

Learn to delete all your Docker objects to help reset your development environment or reclaim a couple of hundred GB of space.

Remove Everything

NB! This will wipe everything and NOT ask for confirmation. Use with care, this is the nuclear option:

docker system prune --all --force --volumes

Clear Cache

To clear all your build cache you can use:

docker builder prune --all --force

Remove Images

docker image prune --all --force

Old Docker Version

docker rmi $(docker images -a -q)

Remove Containers

docker container prune --all --force

Old Docker Version

docker rm $(docker ps -a -q)

Remove volumes

Remove volumes with prune:

docker volume prune --force

Remove Networks

Remove networks with prune:

docker network prune --force