Delete stopped & untagged docker images
— June 9, 2014
If you want or need first stop the containers
$ docker stop $(docker ps -a -q)
Delete all stopped containers
$ docker rm $(docker ps -a -q)
Delete all untagged images (TAG: <none>
)
$ docker rmi $(docker images | awk '/^<none>/ { print $3 }')
By @albertogg
Tweet