I've been trying out all different kinds of containerization and it's a good to have one reminder for myself how to reset the system. So here it goes:
The ubuntu guys did it nice and implemented the uninstall sub-command. To uninstall microk8s
from your system run:
microk8s uninstall
If you installed microk8s
with Homebrew, then uninstall it:
brew rm microk8s
If your added alias for kubectl
in your shell profile remove it manually from your ~/.zshrc
:
alias kubectl="microk8s kubectl"
Run the embedded shell script:
sudo sh /Library/Application\ Support/com.canonical.multipass/uninstall.sh
Or remove its VMs and itself manually:
multipass delete -vv --purge --all
sudo rm -rfv /Library/LaunchDaemons/com.canonical.multipassd.plist
sudo rm -rfv /Library/Application\ Support/com.canonical.multipass
sudo rm -rfv /Applications/Multipass.app
sudo rm -rfv /var/root/Library/Application\ Support/multipassd
sudo rm -rfv /var/root/Library/Application\ Support/multipass-client-certificate
sudo rm -rfv /var/root/Library/Preferences/multipassd
sudo rm -rfv /Library/Logs/Multipass
rm -fv /usr/local/bin/multipass
rm -fv /usr/local/bin/multipass.gui
rm -rfv /usr/local/etc/bash_completion.d/multipass
rm -rfv /usr/local/share/bash-completion/completions/multipass
Uninstall it with Homebrew:
brew rm minikube
Or do it manually:
minikube stop
minikube delete
launchctl stop "*kubelet*.mount"
launchctl stop localkube.service
launchctl disable localkube.service
rm -rfv /usr/local/bin/localkube
rm -rfv /usr/local/bin/minikube
rm -rfv ~/.minikube
If your added alias for kubectl
in your shell profile remove it manually from your ~/.zshrc
:
alias kubectl="minikube kubectl"
podman machine stop podman-machine-default
podman machine rm podman-machine-default
brew rm podman
Use the uninstall script or remove it manually:
sudo docker prune -af --volumes
sudo docker-machine rm -f $(docker-machine ls -q)
sudo rm -rfv /Applications/Docker.app
rm -fv /usr/local/bin/docker
rm -fv /usr/local/bin/docker-machine
rm -rfv /usr/local/bin/docker-machine-driver*
rm -fv /usr/local/bin/docker-compose
rm -rfv /usr/local/share/boot2docker
If you do not know where the binary lives, run:
which kubectl
And then remove the path:
rm -rfv /.rd/bin/kubectl
kubeadm reset
sudo rm -rfv /etc/kubernetes
rm -rfv ~/.kube
brew rm -f kubernetes-cli
https://github.com/docker-archive/toolbox/blob/master/osx/uninstall.sh
https://stackoverflow.com/a/73603526/3524606
canonical/multipass#620 (comment)
https://github.com/docker-archive/toolbox/blob/master/osx/uninstall.sh
https://gist.github.com/rahulkumar-aws/65e6fbe16cc71012cef997957a1530a3