How to Destroy a NAT Gateway

Validated on 19 Nov 2025 • Last edited on 19 Nov 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.

Warning
If you destroy a NAT gateway that is set as the default gateway for a VPC network, Droplets configured to route traffic through the VPC gateway IP lose connectivity. Before destroying a default NAT gateway, either set another NAT gateway as the default or update your Droplet routes to remove the gateway configuration. Read How to Configure Droplets for NAT Gateway for more information.

Similarly, if you unset a NAT gateway as the default gateway without setting another NAT gateway as default, Droplets using the VPC gateway IP for routing lose connectivity. You must either set another NAT gateway as default or reconfigure your Droplets.

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.