Last active
          February 2, 2018 19:06 
        
      - 
      
- 
        Save SunlightJoe/3fa30a4ca9dcdc63a23c00a270346ec2 to your computer and use it in GitHub Desktop. 
  
    
      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 -x | |
| # Docker sometimes decides to not clean up correctly, | |
| # and it will leave stuff behind. This can block rebuilds and cleans. | |
| # Sometimes the simplest solution is to burn it all down and start over. | |
| docker ps -aq | xargs -r docker stop | |
| docker ps -aq | xargs -r docker rm | |
| docker network prune -f | |
| docker images --filter dangling=true -qa | xargs -r docker rmi -f | |
| docker volume ls --filter dangling=true -q | xargs -r docker volume rm | |
| docker images -qa | xargs -r docker rmi -f | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment