Last active
          September 23, 2015 16:07 
        
      - 
      
- 
        Save ViktorOgnev/8f8675bba3c687430fd1 to your computer and use it in GitHub Desktop. 
    remove stopped containers and untagged images 
  
        
  
    
      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 | |
| # stop all | |
| docker stop $(docker ps -a | awk '{print $1}') | |
| # remove all containers | |
| docker rm $(docker ps -a | awk '{print $1}') | |
| # remove untagged images | |
| docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}') | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment