Created
          December 3, 2015 12:53 
        
      - 
      
- 
        Save KillerCodeMonkey/6fc3a408dd4b3709b150 to your computer and use it in GitHub Desktop. 
    Clean up your docker
  
        
  
    
      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
    
  
  
    
  | # remove all exited containers | |
| docker rm -v $(docker ps -a -q -f status=exited) | |
| # remove unused images | |
| docker rmi $(docker images -f "dangling=true" -q) | |
| # docker container that removes unwanted/unused volumes | |
| docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
thanks to:
http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/
👍