Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions menu/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3227,6 +3227,10 @@
{
"label": "I am experiencing SSL/DNS errors and conflicts",
"slug": "pn-name"
},
{
"label": "I can't delete my VPC or Private Network",
"slug": "cant-delete-vpc-pn"
}
],
"label": "Troubleshooting",
Expand Down
6 changes: 5 additions & 1 deletion pages/vpc/how-to/delete-private-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ categories:

4. Type **DELETE** and click **Delete Private Network**.

Your Private Network is deleted.
Your Private Network is deleted.

<Message type="tip">
If you experience any errors or difficulties deleting your Private Network, see our [troubleshooting guide](/vpc/troubleshooting/cant-delete-vpc-pn/).
</Message>
4 changes: 4 additions & 0 deletions pages/vpc/how-to/delete-vpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ You can only delete VPCs that:

3. Type **DELETE** in the box to confirm, then click **Delete VPC**.

<Message type="tip">
If you experience any errors or difficulties deleting your VPC, see our [troubleshooting guide](/vpc/troubleshooting/cant-delete-vpc-pn/).
</Message>


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions pages/vpc/troubleshooting/cant-delete-vpc-pn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
meta:
title: I can't delete my VPC or Private Network
description: Resolve issues deleting your Scaleway VPC or Private Network with this troubleshooting guide. Find solutions to common errors and get back to managing your infrastructure.
content:
h1: I can't delete my VPC or Private Network
paragraph: Resolve issues deleting your Scaleway VPC or Private Network with this troubleshooting guide. Find solutions to common errors and get back to managing your infrastructure.
tags: vpc private-network delete resources ipam error
dates:
validation: 2025-02-21
posted: 2025-02-21
categories:
- network
---

You may want to delete a Private Network or a VPC if you are reorganizing your infrastructure, cleaning up after tests, or if you want to delete a Scaleway [Project](/organizations-and-projects/concepts/#project) or account.

This page helps you solve potential errors that prevent successful deletion.

## VPC vs Private Network

Understanding this difference is important for successful deletion.

- The deletion of a **V**irtual **P**rivate **C**loud (VPC) is prevented if it still contains Private Networks.
- The deletion of a Private Network is prevented if it still has attached resources or reserved IPAM IPs.

Resources (Instances, Managed Databases, Elastic Metal servers etc.) are attached to **Private Networks**, also known as subnets.

Private Networks are created inside a single VPC. One VPC can contain many Private Networks.

## I can't delete my VPC

### VPC deletion problems

You may be attempting to delete your VPC via the [Scaleway console](/vpc/how-to/delete-vpc/), [API](https://www.scaleway.com/en/developers/api/vpc/#path-vpcs-delete-a-vpc) or other developer tool, and see one of the following error messages:

- `resource_still_in_use`
- `Detach resources from this VPC in order to delete it`
- `VPC must be empty to be deleted`
- `precondition failed: resource is still in use`

### VPC deletion solutions

The VPC must contain no Private Networks before you can delete it.

**Ensure you have deleted all the Private Networks inside the VPC**. You can see how many Private Networks are in your [VPC listing](https://console.scaleway.com/vpc/vpc) in the Scaleway console.

<Lightbox src="scaleway-vpc-pns.webp" alt="A screenshot of the Scaleway console highlights the Private Networks column on the VPC listing" />

In order to successfully delete a Private Network, you must ensure no resources are attached to it, and there are no private IPs reserved within the network. See the [information below](#i-cant-delete-my-private-network) for full details.

**Ensure you are not trying to delete a default VPC**. Each Scaleway Project has three auto-created default VPCs, one for each region. These VPCs cannot be deleted. They are free of charge. The existence of default VPCs does not block the deletion of a Scaleway account or Project, as long as the default VPCs do not contain Private Networks with associated/attached resources.

You can identify default VPCs by the **Default** badge in the VPC listing, even if you have changed the name of the VPC itself.

<Lightbox src="scaleway-default-vpcs.webp" alt="A screenshot of the Scaleway console highlights the DEFAULT badges next to certain VPCs on the VPC listing" />

## I can't delete my Private Network

### PN deletion problems

You may be attempting to delete a Private Network VPC via the [Scaleway console](/vpc/how-to/delete-private-network/), [API](https://www.scaleway.com/en/developers/api/vpc/#path-private-networks-delete-a-private-network) or other developer tool, and see one of the following error messages:

- `resource_still_in_use`
- `Detach resources from this Private to delete it`
- `Private Network must be empty to be deleted`
- `precondition failed: resource_still_in_use`

### PN deletion solutions

The Private Network must have no attached or associated resources before you can delete it.

**Ensure you have detached all resources from the Private Network**. In the Scaleway console, you can see how many resources are attached to each Private Network in each VPC's **Private Networks** tab.

<Lightbox src="scaleway-pn-resources.webp" alt="A screenshot of the Scaleway console highlights the 'Resources' indicator next to each Private Network, in the Private Networks listing" />

If there are still attached resources, you must [detach them](/vpc/how-to/attach-resources-to-pn/#how-to-detach-a-resource-from-a-private-network) before proceeding.

**Ensure there are no reserved IPs in IPAM for the Private Network**. If the resource count displays as zero, but you still cannot delete your Private Network, this may be the problem.

- In the [IPAM section](https://console.scaleway.com/ipam/) of the Scaleway console, use the filters to select the region and VPC of your Private Network. If there are any private IPs reserved for the Private Network, release them.

<Lightbox src="scaleway-ipam-release-ip.webp" alt="A screenshot of the Scaleway console highlights the three dot menu next to a reserved private IP address in IPAM, with the 'Release IP' action" />