Monday, December 14, 2015

Deleting docker images based on condition or filter

I posted about deleting docker containers and deleting images.Sometimes we need to clean only some images based on a condition.

I am adding to commands to delete untagged images.You can grep on any value you like.

#Deleting untagged images
docker rmi $(docker images | grep none | awk '{print $3}')

No comments: