Docker 29 cheatsheet

Docker 29: Cleaning up

4 common Docker 29 tasks.

See how much space Docker uses

Show space used by images, containers, volumes and build cache.

docker system df

Remove stopped containers

Delete every stopped container.

docker container prune

Caution: Removes every stopped container, including ones you may still want to restart or inspect.

Remove dangling images

Delete untagged images that nothing uses.

docker image prune

Caution: Removed images have to be rebuilt or pulled again.

Remove unused data

Delete stopped containers, unused networks, dangling images and build cache.

docker system prune

Caution: Anything stopped or unused is deleted. Check docker ps -a first.

Was this page helpful?