Created
January 22, 2017 14:43
-
-
Save timilsinabishal/b0a2161e7d6f146bd34022022ed2ab07 to your computer and use it in GitHub Desktop.
Script to reclaim the disk by removing unused docker data
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
#!bin/bash | |
#clean containers | |
docker rm $(docker ps -a -f status=exited -q) | |
#clean dangling images | |
docker rmi $(docker images -f dangling=true -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment