What if you want to remove all the containers and images from your Docker host where you are just experimenting? Here is a convenient (and also could be dangerous) script.
#!/bin/bash docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q)
Try it at your own risk!