Created
December 5, 2017 21:50
-
-
Save wrparker/c3770c2ad69a901286aacb00ef50a1b2 to your computer and use it in GitHub Desktop.
Removes dangling docker images and volumes
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 | |
| #Remove dangling images | |
| docker rmi $(docker images -q -f "dangling=true") | |
| #Remove dangling volumes | |
| docker volume rm $(docker volume ls -qf dangling=true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment