> Documentation index for agents: /hcp/3.3/en/llms.txt

# Delete a VDC

Delete a VDC (virtual data center) when the team or customer no longer needs it. Center deletes only an empty VDC.

## Before you begin

- You need the **Cluster master** role.

- The VDC has no virtual machines (VMs) — [Delete a VM](/hcp/3.3/en/vms/delete-vm/index.md) or [Move a VM to another VDC](/hcp/3.3/en/vms/move-vm-to-vdc/index.md).

- No network is assigned to the VDC — remove the assignment as described in the "More" section of [Assign a network to a VDC](/hcp/3.3/en/vdcs/assign-network-to-vdc/index.md), or [delete the network](/hcp/3.3/en/networks/delete-network/index.md).

- The VDC has no routers: delete them. To delete a router, select **Virtual Data Centers** → the VDC → **Edges**, click ⋯ in the router row and select **Delete Edge**, then click **Delete** in the **Are you sure want to remove edge \<name>?** window.

- The VDC has no OS images of its own. Delete such an image in the **Image library** section — [Delete an image](/hcp/3.3/en/images/delete-image/index.md).

## 1. Check that the VDC is empty

1. In the left menu, select **Virtual Data Centers** → the VDC → **Virtual Machines**. The list must be empty.
2. Open the **Networks** tab of the VDC page, then the **Primary** tab. The **Assigned** column must show a dash for all networks.
3. Open the **Edges** tab. The list must be empty.

## 2. Delete the VDC

> **Danger**
>
> Deletion cannot be undone. Center deletes the VDC and removes all user roles in it, deletes the placement rules of the VDC and removes the VDC from DRS groups and overrides.

1. In the left menu, select **Virtual Data Centers** → the VDC.
2. Select **Actions** → **Delete VDC**. The **Are you sure want to delete vdc \<name>?** window opens.
3. Click **Delete**.

When the VDC is deleted, the web interface shows the notification **VDC \<name> deleted** and opens the **Virtual Data Centers** list — the deleted VDC is not in it.

### Deletion errors

The web interface shows a notification with the error text, and the VDC remains.

| Error text | Cause | Action |
| - | - | - |
| "VDC has edges. Delete them first" | The VDC has routers | Delete the routers |
| "VDC has assigned VMs" | The VDC has VMs | Delete or move the VMs |
| "VDC has assigned networks", "VDC has assigned ports" | Networks are assigned to the VDC | Remove the assignment or delete the networks |
| "VDC has owned OS images" | The VDC has OS images of its own | Delete them in the **Image library** section — [Delete an image](/hcp/3.3/en/images/delete-image/index.md); Center lists the blocking images in the error data |

## Next

- [VDCs](/hcp/3.3/en/vdcs/index.md) — what a VDC includes.
- [Create a VDC](/hcp/3.3/en/vdcs/create-vdc/index.md)

API methods: `vdc-delete` — in the [API reference](/hcp/3.3/en/api/methods/index.md).
