I am trying to delete a multipass (ubuntu) instance but the tool keeps saying it still exists and does not at the same time. Any thoughts?
Is multipass simply broken/unreliable?
lc@my-Mac ~ % multipass delete microk8s-vm
lc@my-Mac ~ % multipass restart microk8s-vm
restart failed: The following errors occurred:
instance "microk8s-vm" is deleted
lc@my-Mac ~ % multipass launch --name microk8s-vm --mem 4G --disk 40G
launch failed: instance "microk8s-vm" already exists
CodePudding user response:
The delete
command will remove the instances from use but will not destroy the instance. Instances that have been deleted can later be recovered. Now, if you list the instances, you will see that it is actually just marked for deletion and moved to the recycle bin.
$ multipass list
Name | State | IPv4 | Release |
---|---|---|---|
microk8-vm | DELETED | -- | Not Available |
You can recover the deleted instances later by using the command.
$ multipass recover instance-name
If you want to get rid of all the instances in the recycle-bin. You must purge them. The purge command does not take an argument .Instances that are deleted but not destroyed can be permanently removed using the $ multipass purge
command and cannot be recovered.
In order to permanently remove only one instance in a single command, you can use:
$ multipass delete --purge instance-name.