> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/rumi-cli/commands/cloud/hetzner/deprovision.md).

# deprovision

Tear down a deployment: delete every server, then every firewall, then the network.

## Syntax

```bash
rumi cloud hetzner deprovision \
  --api-key <token> \
  --network <network> \
  [options]
```

## Options

| Option      | Short | Description                                                 | Default  |
| ----------- | ----- | ----------------------------------------------------------- | -------- |
| `--api-key` | `-k`  | The Hetzner Cloud project API token (or set `HCLOUD_TOKEN`) | Required |
| `--region`  | `-r`  | The Hetzner location the network is in                      | `fsn1`   |
| `--network` | `-n`  | Name of the network to tear down                            | Required |

## Example

```bash
rumi cloud hetzner deprovision \
  --api-key $HCLOUD_TOKEN \
  --network my-cloud
```

{% hint style="warning" %}
This permanently deletes all servers in the network (platform nodes and service workers) along with their data, every per-role and per-service firewall, and the network itself.
{% endhint %}

## Notes

* Everything is matched by the `rumi-network=<name>` label (plus the network by name), so per-service firewalls created by [launch-instance](https://docs.rumi.systems/rumi-cli/commands/cloud/hetzner/launch-instance.md) are swept too.
* Servers are deleted first, and the command waits up to 2 minutes for them to be gone. Then the firewalls, then the network. Hetzner can report a firewall as still in use for a short while after its servers are deleted, so each firewall delete and the network delete is retried for up to 3 minutes. It is normally released within seconds.
* If a delete fails, the teardown carries on with the rest, and the command then fails with an error naming what was left behind (for example `firewall 12005392`). Run `deprovision` again to remove it. A leftover firewall keeps its name, so provisioning a network of the same name fails until it is removed.

## See Also

* [create-network](https://docs.rumi.systems/rumi-cli/commands/cloud/hetzner/create-network.md)
* [launch-platform](https://docs.rumi.systems/rumi-cli/commands/cloud/hetzner/launch-platform.md)
