Skip to content

Add uninstall.sh script #168

@guymguym

Description

@guymguym

With @rootfs help I got some of the commands, and added some cleanups to the systemd service.
I used something like this, which is probably not suitable for most users because it might be too destructive:

[root@server ~]# cat microshift-uninstall.sh
#!/bin/bash

V()
{
  echo "### $*"
  $*
}

V systemctl stop microshift
V systemctl disable microshift
V rm -rf /etc/systemd/system/microshift
V rm -rf /usr/lib/systemd/system/microshift
V systemctl daemon-reload
V systemctl reset-failed

V crictl stop $(crictl ps -q) -t 1
# V crictl rm $(crictl ps -q -a) -t 1

V "mount | grep overlay | awk '{print \$3}' | xargs umount"
V "mount | grep kubelet | awk '{print \$3}' | xargs umount"
V pkill -9 pause

V rm -rf /var/lib/microshift
V rm -rf /var/lib/rook
V rm -rf /var/lib/etcd
V rm -rf /var/lib/kubelet
V rm -rf $HOME/.kube

V mkdir -p /var/lib/kubelet
V chcon -R -t container_file_t /var/lib/kubelet/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions