Skip to content

Instantly share code, notes, and snippets.

@kaz3w
Created September 3, 2019 01:01
Show Gist options
  • Save kaz3w/3616e439d2d03f9ada3809f20573a72c to your computer and use it in GitHub Desktop.
Save kaz3w/3616e439d2d03f9ada3809f20573a72c to your computer and use it in GitHub Desktop.
delete <none> tagged images
#!/bin/sh
for id in `docker images | grep 'none' | awk '/[0-9a-f]+/{ print $3 }'`
do
docker rmi -f $id
echo "remove image ID:" $id
done
docker images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment