Docker: Remove Images and Containers

Want to remove some images ? Want to remove all exited containers ? The following commands might help you then.

# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# Delete all exited containers
docker rm $(docker ps -aq -f status=exited)