---
title: dots.v2.vpcs.byVpc_Id().delete()
description: Delete a VPC
product: Reference
url: https://docs.digitalocean.com/reference/dots/reference/vpcs/vpcs-delete/
last_updated: "2026-11-18"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# dots.v2.vpcs.byVpc_Id().delete()

Generated on 18 Nov 2026 from DoTs version [`v1.25.0`](https://github.com/digitalocean/dots/releases/tag/v1.25.0)

## Usage

```typescript
client.v2.vpcs.byVpc_Id(vpc_Id).delete(requestConfiguration?: RequestConfiguration<object>): Promise<void>
```

## Description

To delete a VPC, send a DELETE request to [`/v2/vpcs/{vpc_id}`](https://docs.digitalocean.com/reference/api/reference/vpcs/index.html.md#vpcs_delete). A 204 status code with no body will be returned in response to a successful request.

The default VPC for a region can not be deleted. Additionally, a VPC can only be deleted if it does not contain any member resources. Attempting to delete a region’s default VPC or a VPC that still has members will result in a 403 Forbidden error response.

## Parameters

`vpc_Id` string required

Example: `4de7ac8b-495b-4884-9a69-1050c6793cd6`

A unique identifier for a VPC.

Min: `1`

## Request Sample

## Show Request Sample

```typescript
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

await client.v2.vpcs
    .byVpc_Id("4de7ac8b-495b-4884-9a69-1050c6793cd6").delete();
```

## More Information

See [`/v2/vpcs/{vpc_id}`](https://docs.digitalocean.com/reference/api/reference/vpcs/index.html.md#vpcs_delete) in the API reference for additional detail on responses, headers, parameters, and more.