Remove All Docker Container and Images

26 Januari 2017 • Programming
1 min read • xxx views

After build and rebuild Docker it will created lots of images and containers. In case you want remove all of them to save your disk space, here the solution that if find when googling.

Warning: This command will destroy all your images and containers. It will not be possible to restore them! DIWYOR

Execute those commands in a shell:

Delete all containers

docker rm $(docker ps -a -q)

# Delete all images
docker rmi $(docker images -q)

This solution has be proposed by GitHub user @crosbymichael in this issue