Last active
July 30, 2022 02:50
-
-
Save SharkFourSix/e71bb5dacd68632dc69affa7c3af6b57 to your computer and use it in GitHub Desktop.
Delete docker images using image ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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