Or the marginally shorter:
docker images -f "dangling=true" -q | xargs -r docker rmi docker images -f "dangling=true" -q | xargs -r docker rmi docker images -qf dangling=true | xargs -r docker rmi
Along with: docker ps -aqf status=exited | xargs -r docker rm
You've got two essential Docker aliases for cleaning up your dev environment. docker ps -q | xargs docker stats