Skip to content

Instantly share code, notes, and snippets.

@scottwn
Created March 9, 2022 21:18
Show Gist options
  • Save scottwn/a742e65ea988778d8e9152cb45e907fe to your computer and use it in GitHub Desktop.
Save scottwn/a742e65ea988778d8e9152cb45e907fe to your computer and use it in GitHub Desktop.
#!/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