Skip to content

Instantly share code, notes, and snippets.

Last active June 19, 2023 10:03
Star You must be signed in to star a gist
What would you like to do?
Cleanup host added as custom to Rancher 2.0
# OUTDATED: please refer to the link below for the latest version:
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
Copy link

qrzeller commented May 4, 2020

Thanks !
ros should have a clean function. Or reinstall from cloud-config...

Copy link

Will this unregister the node from the cluster too ?

Copy link

saved me a bunch of time, tyvm!

Copy link

Are you shure it's /var/run/calico and not /var/lib/calico?

Copy link

@HoffmannP This gist is outdated, I updated the code with a link to the updated version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment