Skip to content

Instantly share code, notes, and snippets.

@SharkFourSix
Last active July 30, 2022 02:50
Show Gist options
  • Save SharkFourSix/e71bb5dacd68632dc69affa7c3af6b57 to your computer and use it in GitHub Desktop.
Save SharkFourSix/e71bb5dacd68632dc69affa7c3af6b57 to your computer and use it in GitHub Desktop.
Delete docker images using image ID
for ID in $(sudo docker images --format "{{.ID}}" --filter "dangling=true")
do
echo "forcefully delete image $ID"
sudo docker rmi -f $ID
done
sudo docker images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment