> For the complete documentation index, see [llms.txt](https://docs.platform9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform9.com/private-cloud-director/2025.10/getting-started/self-hosted/airctl/uninstall-self-hosted-deployment.md).

# Uninstall Self-Hosted Deployment

This section describes how to safely delete a **region** from <code class="expression">space.vars.self\_hosted\_product\_name</code> using the `airctl` CLI. Region deletion should be performed carefully, as it involves removing associated configuration and metadata.

### Prerequisites & Safety Checks <a href="#prerequisites--safety-checks" id="prerequisites--safety-checks"></a>

Before proceeding with a region deletion, ensure the following:

1. **Take a complete backup** using the steps outlined in the [Backup Guide](https://platform9.com/docs/private-cloud-director/private-cloud-director/backup-and-restore#manual-backup-procedure).
   * This ensures that critical region data and configurations can be restored if needed.
2. **Verify the current regions** managed by your setup: `airctl get-regions`
   * Review the output and confirm the target region name(s) you plan to delete.
3. Ensure no ongoing deployments, upgrades, or workloads are running in the target region.
4. Gracefully terminate or migrate workloads if needed.

Example :

```bash
$ /opt/pf9/airctl/airctl get-regions --config /opt/pf9/airctl/conf/airctl-config.yaml 
Deployed Regions:
• Infra
• LON
```

### Command Syntax <a href="#command-syntax" id="command-syntax"></a>

#### Delete a specific region

To delete a specific region, use the following `airctl` command

```bash
airctl unconfigure-du \
  --config /opt/pf9/airctl/conf/airctl-config.yaml \
  --region <REGION_NAME>
```

This command will uninstall and remove configured regions along with all infrastructure software like consul, vault, percona, k8sniff, etc.

Options:

* `--region <REGION_NAME>` – Deletes the specified region.
* **Omit the `--region` flag** to delete *all* configured regions.
* Use the `--force` flag if the region deployment was halted or failed midway. This forces cleanup even when the state is inconsistent.

Use the `--force` flag if the region deployment was halted or failed midway. This forces cleanup even when the state is inconsistent.

{% hint style="info" %}
Use the `--force` flag if the region deployment was halted or failed midway. This forces cleanup even when the state is inconsistent.
{% endhint %}

Example:

```bash
airctl unconfigure-du --config /opt/pf9/airctl/conf/airctl-config.yaml --region LON
```

#### Verification & Cleanup <a href="#verification--cleanup" id="verification--cleanup"></a>

After deletion, verify that the region has been successfully removed. The deleted region should no longer appear in the list of active regions.

```bash
$ /opt/pf9/airctl/airctl get-regions --config /opt/pf9/airctl/conf/airctl-config.yaml 
Deployed Regions:
• Infra
```

If you plan to reuse the same nodes to deploy a new self-hosed <code class="expression">space.vars.product\_name</code> environment, make sure to also run the following command on all nodes first.

```bash
rm -rf airctl* install-pcd.sh nodelet* options.json pcd-chart.tgz /opt/pf9/airctl/ .airctl/
```

#### Delete the Management Cluster <a href="#delete-the-management-cluster" id="delete-the-management-cluster"></a>

The final step is to delete the cluster to complete the cleanup or redeploy from scratch.

```bash
/opt/pf9/airctl/airctl delete-cluster --config /opt/pf9/airctl/conf/airctl-config.yaml
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform9.com/private-cloud-director/2025.10/getting-started/self-hosted/airctl/uninstall-self-hosted-deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
