GibilGibil

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

FlagTypeDefaultDescription
--allbooleanfalseDestroy all active servers
--jsonbooleanfalseOutput 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 --json

What gets cleaned up

  1. Cloud server — deleted via the original provider's API (Hetzner or Vultr, whichever forged it)
  2. Cloud SSH key — uploaded public key removed from the same provider
  3. Local SSH keys~/.gibil/keys/<name>/ deleted
  4. Local metadata~/.gibil/instances/<name>.json removed

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

On this page