Cleaning up in Docker

So you have read how to get Docker on your Raspberry Pi, had a play around and now you have containers, images and volumes running wild. You’re overwhelmed, the shipis overloaded; rather than sink, how about we reset and clean up?

Pause, take a breath and following along:

Stop all running containers

docker stop $(docker ps -a -q)

Remove all containers

docker rm $(docker ps -a -q)

Remove all volumes

docker volume prune -f

Remove all images

docker rmi $(docker images -q)

Back to square one. Keep on tinkering!

James Written by:

Be First to Comment

Helpful? Have a question on the above?