Last active
February 21, 2020 01:26
-
-
Save tuffacton/a4a41f18305491f6d7dac3b68f00bac2 to your computer and use it in GitHub Desktop.
Remove all docker images that follow a certain pattern.
This file contains hidden or 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
| #!/bin/bash | |
| pattern = $0 | |
| docker images -a | grep "$pattern" | awk '{print $3}' | xargs docker rmi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment