Created
March 9, 2022 21:18
-
-
Save scottwn/a742e65ea988778d8e9152cb45e907fe to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env fish | |
for image in (docker images) | |
if string match -q '*none*' (string split ' ' --no-empty -f1 $image) | |
docker image rm (string split ' ' --no-empty -f3 $image) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment