Created
August 9, 2015 06:00
-
-
Save ssig33/0e67e3254699f7b923a5 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
#!/usr/bin/env ruby | |
ary = `sudo docker ps -a -q`.split("\n") | |
ary.each_with_index{|x,i| | |
system "sudo docker rm #{x}" | |
puts "#{i+1} / #{ary.count}" | |
} | |
ary = `sudo docker images | awk '/^<none>/ { print $3 }'`.split("\n") | |
ary.each_with_index{|x,i| | |
system "sudo docker rmi #{x}" | |
puts "#{i+1} / #{ary.count}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment