vers kill
Delete one or more VMs by ID or alias.
This operation is irreversible - deleted VMs lose all state including filesystem contents, memory, and running processes.
Usage
vers kill # Delete current HEAD VM
vers kill [vm-id|vm-alias]... # Delete one or more VMs
vers kill -r vm-with-children # Delete VM and all its children
The kill command is an alias for vers delete. Both commands work identically.
Options
| Option | Description |
|---|
--yes, -y | Skip confirmation prompts |
--recursive, -r | Recursively delete all children |
Examples
Delete VMs
# Delete current HEAD VM
vers kill
# Delete specific VM
vers kill vm-123abc
# Delete multiple VMs
vers kill my-dev-vm my-test-vm vm-456def
# Delete VM with children recursively
vers kill -r vm-with-children
# Delete without confirmation prompt
vers kill -y vm-123abc
# Delete recursively without confirmation
vers kill -y -r vm-with-children
How it works
The kill command provides different deletion strategies:
VM deletion
- Single VM: Deletes the specified VM and handles HEAD cleanup
- Multiple VMs: Processes each VM sequentially with error handling
- HEAD VM: Optimized path for deleting the current HEAD VM
- Recursive deletion: Deletes VM and all its children when using
-r
Confirmation prompts
Basic deletion confirmation
vers kill vm-abc123
Warning: You are about to delete VM 'vm-abc123'
Are you sure you want to proceed? [y/N]:
HEAD impact warning
Warning: This will clear the current HEAD
Do you want to continue? [y/N]:
Error handling
VM with children
vers kill vm-parent
Cannot delete VM - it has child VMs that would be orphaned.
This VM has child VMs. Deleting it would leave them without a parent,
which could cause data inconsistency.
To delete this VM and all its children, use the --recursive (-r) flag:
vers kill vm-parent -r
Failed operations
For multiple targets, the command provides detailed summaries:
vers kill vm-1 vm-2 vm-3
Processing 3 VMs...
✓ VM 'vm-1' deleted successfully
✗ FAILED to resolve VM 'vm-2': not found
✓ VM 'vm-3' deleted successfully
Summary: 2 VMs succeeded, 1 VMs failed
HEAD cleanup
When deletion affects your current HEAD VM:
vers kill vm-current
✓ VM 'vm-current' deleted successfully
HEAD cleared (VM was deleted)
The command automatically cleans up local state when deleting VMs that were pointed to by HEAD.
Prerequisites
- VMs must exist and be accessible
- For recursive deletion, you must own all child VMs
- Network connectivity to perform deletion operations
See Also