Last active
January 21, 2020 21:04
-
-
Save resmall/760697aacb5aa6e146cfb3a94cd1ca37 to your computer and use it in GitHub Desktop.
clear docker images and inactive containers
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
docker rmi $(docker images -a --filter=dangling=true -q) | |
docker rm $(docker ps --filter=status=exited --filter=status=created -q) | |
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