Warning: this post contains blat scripts

If you ever wish to purge all of your docker images from your system, say in case you did something really silly, you need to run this:

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

Add sudo before docker if that required in your setup.

Running this script will remove all images and containers from your docker installation. This is not reverseable

[Original Source]