Skip to content

Instantly share code, notes, and snippets.

@Elzair
Created December 1, 2014 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elzair/7d2a54ddba726bd8983b to your computer and use it in GitHub Desktop.
Save Elzair/7d2a54ddba726bd8983b to your computer and use it in GitHub Desktop.
Remove Unused Docker Images
#!/bin/sh
# This script removes docker images with a repository tag of <none>.
for i in $(sudo docker images | awk '{print $1,$3;}' | grep '<none>' | awk '{print $2;}')
do
sudo docker rmi $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment