Skip to content

Instantly share code, notes, and snippets.

@mtparet
Last active May 25, 2018 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtparet/7d92bae1ca5b62dd85318fada4105368 to your computer and use it in GitHub Desktop.
Save mtparet/7d92bae1ca5b62dd85318fada4105368 to your computer and use it in GitHub Desktop.
docker rancher cleanup
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
docker rmi $(docker images -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment