How to Destroy a NAT Gatewaypublic

Validated on 28 Aug 2025 • Last edited on 28 Aug 2025

A Virtual Private Cloud (VPC) is a private network interface for collections of DigitalOcean resources. VPC networks are inaccessible from the public internet and other VPC networks, and traffic on them doesn’t count against bandwidth usage. You can link VPC networks to each other using VPC peering connections.

Destroying a NAT gateway permanently and irreversibly deletes the gateway and terminates its connections.

Destroy a NAT Gateway Using the Command Line

How to Destroy a NAT Gateway Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.
  2. Create a personal access token and save it for use with doctl.
  3. Use the token to grant doctl access to your DigitalOcean account.
    doctl auth init
  4. Finally, run doctl compute vpc-nat-gateway delete. Basic usage looks like this, but you can read the usage docs for more details:
    doctl compute vpc-nat-gateway delete <gateway-id> [flags]

Destroy a NAT Gateway Using the API

How to Destroy a NAT Gateway Using the DigitalOcean API
  1. Create a personal access token and save it for use with the API.
  2. Send a DELETE request to https://api.digitalocean.com/v2/vpc_nat_gateways.

Destroy a NAT Gateway Using the Control Panel

To destroy a NAT gateway, click Networking in the left menu, then click the VPC tab. Click on the VPC that contains the NAT gateway you want to destroy, then click its NAT Gateway tab.

In the listing of the VPC’s NAT gateways, click the menu of the NAT Gateway you want to destroy, then click Destroy.

In the confirmation window, type the name of the NAT gateway to confirm, then click Destroy NAT Gateway to permanently destroy the NAT gateway and immediately terminate its connections.

You can also destroy a NAT gateway from its Settings tab.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.