Skip to main content
Code and think

Docker clean/prune image

To remove Docker container you can use: docker rm ID/name e.g. docker rm my-container.

To remove Docker images you can use: docker rmi ID/name e.g. docker rm my-image.

To remove all dead containers execute: docker rm $(docker ps --all -q -f status=dead)

If you use many Docker images you might have some of them dangling and unused. To remove all unused Docker items execute: docker system prune --volumes --all --force or in short: docker system prune -a --volumes -f Reference