Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
docker filter format dockerfilter dockerformat

search specific images by name and

docker images -a --format '{{.Repository}} {{.Tag}} {{.ID}}' | grep 'acme-api' |awk '$2 ~ "none" {print $3}'

delete untagged images

docker rmi $(docker images -a --format '{{.Repository}} {{.Tag}} {{.ID}}' | grep 'acme-api' |awk '$2 ~ "none" {print $3}')

delete images

docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'acme-api')
| cut -d ' ' -f3  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment