Skip to content

Instantly share code, notes, and snippets.

@nghnam
Forked from superseb/cleanup.sh
Created June 18, 2019 07:06
Show Gist options
  • Save nghnam/1a487683b31ab6d98d9ad909bb3fc7a0 to your computer and use it in GitHub Desktop.
Save nghnam/1a487683b31ab6d98d9ad909bb3fc7a0 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