Skip to content

Instantly share code, notes, and snippets.

@rahulvramesh
Forked from superseb/cleanup.sh
Created April 13, 2019 18:53
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 rahulvramesh/fd30d56ec905553b007e9fcaed2ddb9f to your computer and use it in GitHub Desktop.
Save rahulvramesh/fd30d56ec905553b007e9fcaed2ddb9f to your computer and use it in GitHub Desktop.
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
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