ls6qsw
Last Updated: November 02, 2017
·
105
· bmwant
Nfsmw

Docker remove all images despite containers using them

docker rmi -f $(docker images -q)

Remove all containers:
docker rm $(docker ps -a -q)

Remove all images without name:
docker rmi $(docker images | grep '^<none>' | awk '{ print $3 }')
Forced removal (even if some container is using it):
docker rmi -f $(docker images | grep '^<none>' | awk '{ print $3 }')

Say Thanks
Respond

1 Response
Add your response

27579
8e9e135bb9e8b1827ceaf690f9a9e5c3

Try docker rmi $(docker images -f "dangling=true" -q) to remove unnamed images

over 1 year ago ·