Docker Cleanup

Cleaning up after docker

Docker is an awesome tool for packing things into easily deployable artefacts, it also chews up disk space like a world record holding eating champion and doesn’t have any obvious method for removing junk you probably don’t need any more. So here are a couple of quick commands that can be used to clean up after it. The first one is to remove any containers that aren’t running. docker rm $(docker ps -a -q) The secone one is to remove any images that are not currently tagged or attached to a tagged instance.