Skip to content

Instantly share code, notes, and snippets.

@nicbet
Last active January 19, 2020 19:13
Show Gist options
  • Save nicbet/5fa5a98f41dcdd2ffbae56e8cda4d78d to your computer and use it in GitHub Desktop.
Save nicbet/5fa5a98f41dcdd2ffbae56e8cda4d78d to your computer and use it in GitHub Desktop.
Delete all <none> Docker Images
alias clean_docker_images='for i in (docker image ls | grep none | tr -s " " | cut -d " " -f 3); docker image rm $i; end'
funcsave clean_docker_images
#!/bin/bash
for i in `docker image ls | grep none | tr -s ' ' | cut -d " " -f 3`; do docker image rm $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment