Created
March 15, 2022 16:43
-
-
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.
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
# 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