> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# vers kill

> Delete one or more VMs. `kill` is an alias for `delete`.

`vers kill` deletes one or more VMs. It's an alias for `vers delete` — both names work identically, and nothing changes depending on which you use.

<Warning>
  This operation is **irreversible**. Deleted VMs lose all state: filesystem contents, memory, running processes.
</Warning>

## Synopsis

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill                              # Delete current HEAD VM
vers kill <vm-id|alias>...             # Delete one or more VMs
vers kill -r <vm-id>                   # Delete VM and all its children
vers kill -y <vm-id>                   # Skip confirmation
```

## Options

| Option            | Description                     |
| ----------------- | ------------------------------- |
| `-y, --yes`       | Skip confirmation prompts       |
| `-r, --recursive` | Recursively delete all children |

## Examples

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
# Delete current HEAD VM
vers kill

# Delete a specific VM
vers kill vm-123abc

# Delete multiple VMs at once
vers kill my-dev-vm my-test-vm vm-456def

# Delete a VM and its children
vers kill -r vm-with-children

# Delete without confirmation
vers kill -y vm-123abc

# Delete everything
vers kill $(vers status -q)
```

## HEAD cleanup

When you delete the VM that HEAD points to, HEAD is cleared automatically:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill vm-current
✓ VM 'vm-current' deleted successfully
HEAD cleared (VM was deleted)
```

## Errors

### VM with children

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill vm-parent
Cannot delete VM - it has child VMs that would be orphaned.

To delete this VM and all its children, use the --recursive (-r) flag:
  vers kill vm-parent -r
```

### Mixed results across multiple targets

For multiple VMs, the command reports each outcome and exits non-zero if any failed:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
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
```

## Prerequisites

* VMs must be owned by your organization.
* Recursive deletion requires ownership of every child in the tree.

## Common Patterns

### Nuke everything

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill -y $(vers status -q)
```

### Clean up paused VMs only

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill -y $(vers status --format json | jq -r '.[] | select(.state == "Paused") | .vm_id')
```

### Clean slate + fresh start

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
vers kill -y $(vers status -q)
vers run --vm-alias fresh
```

### Destroy an experiment without touching its parent

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
# Created earlier: vers branch main-vm --vm-alias experiment
vers kill -y experiment   # main-vm untouched
```

## See also

* [vers status](/cli-reference/status) — list VMs before or after deletion
* [vers run](/cli-reference/run) — start a fresh VM
* [vers commit](/cli-reference/commit) — snapshot before deleting if you might want the state back
