Skip to content

Instantly share code, notes, and snippets.

@darrensapalo
Created August 18, 2020 03:59
Show Gist options
  • Save darrensapalo/147b876cccdc7b32aa590e2cb5e11672 to your computer and use it in GitHub Desktop.
Save darrensapalo/147b876cccdc7b32aa590e2cb5e11672 to your computer and use it in GitHub Desktop.
Clean up docker images with <none>
#! /bin/sh
IMAGE_IDS=$(docker image ls | grep '<none>' | sed -r 's/.*([a-f0-9]{12}).*/\1/g')
echo "Deleting $IMAGE_IDS"
docker image rm $IMAGE_IDS
@darrensapalo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment