Last active
December 10, 2016 10:58
-
-
Save sameo/bb5cbad5200af1f7d59ab56abae8700a to your computer and use it in GitHub Desktop.
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 | |
printf "Killing all Docker containers..." | |
docker rm -f $(sudo docker ps -a -q) 2> /dev/null | |
printf "Done\n" | |
printf "Killing all runC containers..." | |
for i in `runc list -q`; do | |
runc kill $i SIGKILL 2> /dev/null | |
runc delete $i; | |
done | |
printf "Done\n" | |
printf "Killing all ocid instances..." | |
killall -9 ocid 2> /dev/null | |
printf "Done\n" | |
printf "Unmounting shm..." | |
for i in `ls /var/lib/ocid/sandboxes/`; do | |
umount /var/lib/ocid/sandboxes/$i/shm 2> /dev/null; | |
done | |
printf "Done\n" | |
printf "Cleaning all CRI-O files..." | |
rm -rf /var/lib/ocid | |
printf "Done\n" | |
printf "Docker containers:\n" | |
docker ps -a -q | |
printf "RunC containers:\n" | |
runc list -q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment