Skip to content

Instantly share code, notes, and snippets.

@unkwn1-repo
Created March 15, 2022 16:43
Show Gist options
  • Save unkwn1-repo/d3f61b44f5c189e2bdbef85f3952c857 to your computer and use it in GitHub Desktop.
Save unkwn1-repo/d3f61b44f5c189e2bdbef85f3952c857 to your computer and use it in GitHub Desktop.
A command i used to delete all docker images I had. Only suitable for a mass deletion.
# Assumes you're in the docker group
# if not, run `sudo usermod -aG docker $USER`
# Column $3 is the image IDs
docker images | for i in `awk 'NR>1{print $3}'`; do docker rmi $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment