Skip to content

Instantly share code, notes, and snippets.

@superseb
Last active August 13, 2024 07:31
Show Gist options
  • Save superseb/2cf186726807a012af59a027cb41270d to your computer and use it in GitHub Desktop.
Save superseb/2cf186726807a012af59a027cb41270d to your computer and use it in GitHub Desktop.
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.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
@superseb
Copy link
Author

@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