There should be a simple way to remove all Flynn binaries, config and images from a system.
We should consider installing everything into say /opt/flynn
to make the uninstall easier.
For anyone wanting to remove Flynn because the cluster is broken and you want to start from scratch, you can pass the --clean
flag to the installer script which will stop and remove Flynn before re-installing:
curl -fsSL -o /tmp/install-flynn https://dl.flynn.io/install-flynn
sudo bash /tmp/install-flynn --clean
To just remove everything without re-installing, here are the steps to take:
# stop flynn-host daemon
sudo stop flynn-host
# cleanup any remaining containers
virsh -c lxc:/// list --name | xargs -L 1 virsh -c lxc:/// destroy
# unmount ZFS volumes
grep zfs /proc/mounts | cut -d ' ' -f2 | sudo umount
# destroy ZFS volumes and zpool
flynn-host destroy-volumes --include-data
zpool destroy flynn-default
# remove Flynn files and directories
rm -rf /usr/local/bin/flynn* /var/lib/flynn /etc/flynn
This command is giving me error. Any idea why?
virsh -c lxc:/// list --name | xargs -L 1 virsh -c lxc:/// destroy
error: command 'destroy' requires <domain> option
@tuananh Use the install script with the --remove
flag.
Most helpful comment
@tuananh Use the install script with the
--remove
flag.