|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: I can't delete my VPC or Private Network |
| 4 | + 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. |
| 5 | +content: |
| 6 | + h1: I can't delete my VPC or Private Network |
| 7 | + 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. |
| 8 | +tags: vpc private-network delete resources ipam error |
| 9 | +dates: |
| 10 | + validation: 2025-02-21 |
| 11 | + posted: 2025-02-21 |
| 12 | +categories: |
| 13 | + - network |
| 14 | +--- |
| 15 | + |
| 16 | +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. |
| 17 | + |
| 18 | +This page helps you solve potential errors that prevent successful deletion. |
| 19 | + |
| 20 | +## VPC vs Private Network |
| 21 | + |
| 22 | +Understanding this difference is important for successful deletion. |
| 23 | + |
| 24 | +- The deletion of a **V**irtual **P**rivate **C**loud (VPC) is prevented if it still contains Private Networks. |
| 25 | +- The deletion of a Private Network is prevented if it still has attached resources or reserved IPAM IPs. |
| 26 | + |
| 27 | +Resources (Instances, Managed Databases, Elastic Metal servers, etc.) are attached to **Private Networks**, also known as subnets. |
| 28 | + |
| 29 | +Private Networks are created inside a single VPC. One VPC can contain many Private Networks. |
| 30 | + |
| 31 | +## I can't delete my VPC |
| 32 | + |
| 33 | +### VPC deletion problems |
| 34 | + |
| 35 | +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: |
| 36 | + |
| 37 | +- `resource_still_in_use` |
| 38 | +- `Detach resources from this VPC in order to delete it` |
| 39 | +- `VPC must be empty to be deleted` |
| 40 | +- `precondition failed: resource is still in use` |
| 41 | + |
| 42 | +### VPC deletion solutions |
| 43 | + |
| 44 | +The VPC must contain no Private Networks before you can delete it. |
| 45 | + |
| 46 | +**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. |
| 47 | + |
| 48 | + <Lightbox src="scaleway-vpc-pns.webp" alt="A screenshot of the Scaleway console highlights the Private Networks column on the VPC listing" /> |
| 49 | + |
| 50 | +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. |
| 51 | + |
| 52 | +**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. |
| 53 | + |
| 54 | + You can identify default VPCs by the **Default** badge in the VPC listing, even if you have changed the name of the VPC itself. |
| 55 | + |
| 56 | + <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" /> |
| 57 | + |
| 58 | +## I can't delete my Private Network |
| 59 | + |
| 60 | +### PN deletion problems |
| 61 | + |
| 62 | +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: |
| 63 | + |
| 64 | +- `resource_still_in_use` |
| 65 | +- `Detach resources from this Private to delete it` |
| 66 | +- `Private Network must be empty to be deleted` |
| 67 | +- `precondition failed: resource_still_in_use` |
| 68 | + |
| 69 | +### PN deletion solutions |
| 70 | + |
| 71 | +The Private Network must have no attached or associated resources before you can delete it. |
| 72 | + |
| 73 | +**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. |
| 74 | + |
| 75 | + <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" /> |
| 76 | + |
| 77 | + 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. |
| 78 | + |
| 79 | +**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. |
| 80 | + |
| 81 | + - 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. |
| 82 | + |
| 83 | + <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" /> |
| 84 | + |
0 commit comments