vers kill
Delete one or more VMs or clusters 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 -c [cluster-id|cluster-alias]... # Delete one or more clusters
vers kill -a # Delete ALL clusters
Options
| Option | Description |
|---|
--yes, -y | Skip confirmation prompts |
--recursive, -r | Recursively delete all children (VMs only) |
--cluster, -c | Target clusters instead of VMs |
--all, -a | Delete ALL clusters (use with extreme caution) |
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 clusters
# Delete single cluster
vers kill -c cluster-456def
# Delete multiple clusters
vers kill -c my-cluster other-cluster
# Delete ALL clusters (dangerous!)
vers kill -a
Skip confirmations
# Delete without prompts
vers kill -y vm-123abc
vers kill -y -c my-cluster
vers kill -a -y # Delete all clusters without confirmation
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
Cluster deletion
- Single/Multiple clusters: Deletes specified clusters and all their VMs
- All clusters: Nuclear option that deletes every cluster in your account
- VM cleanup: Automatically handles HEAD cleanup for deleted VMs
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]:
Cluster deletion with VM count
vers kill -c my-cluster
⚠ Warning: You are about to delete cluster 'my-cluster' (5 VMs)
Are you sure you want to proceed? [y/N]:
Delete all clusters confirmation
vers kill -a
DANGER: You are about to delete ALL 3 clusters and their VMs:
1. Cluster 'production' (8 VMs)
2. Cluster 'staging' (4 VMs)
3. Cluster 'development' (2 VMs)
This action is IRREVERSIBLE and will delete ALL your data!
Type 'DELETE ALL' to confirm:
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
To see the VM tree structure, run:
vers tree
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
- vers tree - View VM relationships before deletion
- vers status - Check current environment
- vers up - Start new environment after deletion