To delete all untagged images:

docker rmi $(docker images -q --filter "dangling=true")