gibil destroy
Burn down a server and clean up all resources
When the work is done, the fire goes out. Destroy reads the instance metadata, resolves the original provider via the registry, deletes the server and SSH key from that cloud, and cleans up local files.
Usage
gibil destroy <name> [--json]
gibil destroy --all [--json]Options
| Flag | Type | Default | Description |
|---|---|---|---|
--all | boolean | false | Destroy all active servers |
--json | boolean | false | Output as JSON |
Examples
# Destroy a single server
gibil destroy my-app
# Destroy all servers
gibil destroy --all
# JSON output for agents
gibil destroy my-app --jsonWhat gets cleaned up
- Cloud server — deleted via the original provider's API (Hetzner or Vultr, whichever forged it)
- Cloud SSH key — uploaded public key removed from the same provider
- Local SSH keys —
~/.gibil/keys/<name>/deleted - Local metadata —
~/.gibil/instances/<name>.jsonremoved
Destroy is permanent. Any data on the VM that wasn't pushed to a remote (git, S3, etc.) is gone.
If the server is already gone
If the TTL expired and the server was auto-destroyed, gibil destroy still cleans up local files. It won't error.
Next steps
- gibil create — forge a new server
- gibil list — check what's running
- Troubleshooting — orphaned resources