Clean up a load balancing setup

After you set up a load balancer, you can delete the resources that you made sothat you aren't billed for them in the future. If these resources were createdwithin their own project, you can delete the entire project. Otherwise, you candelete the resources individually.

Deleting the project

Caution: Deleting a project has the following effects:
  • Everything in the project is deleted. If you used an existing project, when you delete it, you also delete any other work that you've done in the project.
  • Custom project IDs are lost. When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as aYOUR_PROJECT_ID.REGION_ID.r.appspot.com URL, delete selected resources inside the project instead of deleting the project.

Console

  1. In the Google Cloud console, go to theProjects page.

    Go to Projects

  2. In the project list, select the project that you want to delete, and thenclickDelete.

  3. In the dialog, type thePROJECT_ID, and then clickShut down to delete the project.

gcloud

Run the following command, replacingPROJECT_ID with yourproject ID:

gcloud projects deletePROJECT_ID

Deleting individual resources

Deleting the load balancer

  1. In the Google Cloud console, go to theLoad balancing page.

    Go to Load balancing

  2. Select the checkbox next to your load balancer name.

  3. At the top of the page, clickDelete.

  4. Select the checkboxes next to all the additional resources, includingbackend services, backend buckets, health checks, and SSL certificates.

  5. ClickDelete load balancer and the selected resources.

Note: If you try to delete an external passthrough Network Load Balancer with target pool backends by usinga mixed TCP/UDP configuration from the Google Cloud console, you might get thefollowing message:This load balancer has TCP/UDP mixed configuration. UseGoogle Cloud CLI or REST API to delete it. You first need to remove the individualresources (forwarding rules, target proxy, URL map, health checks or target pool)by using the Google Cloud CLI or REST API depending on whatever is configured forthe load balancer.

Deleting the Cloud Storage buckets

If you created backend buckets, deleting the load balancer and backend bucketsdoesn't delete the underlying Cloud Storage buckets or the objectscontained within them.

For information about deleting Cloud Storage buckets and the objectscontained within them, seeDeleting buckets.

Deleting the instance groups

If you created instance groups, delete them. Deleting the instance groupalso deletes the individual VMs.

  1. In the Google Cloud console, go to theInstance groups page.

    Go to Instance groups

  2. To select all instance groups, select the checkbox next toName, and thenclickDelete.

  3. In the confirmation window, clickDelete.

Deleting the VM instances

If you created standalone VM instances, delete them.

  1. In the Google Cloud console, go to theVM instances page.

    Go to VM instances

  2. Select the checkbox next toName to select all instances, andthen clickDelete.

  3. In the confirmation window, clickDelete.

Deleting the NEGs

If you created any network endpoint groups (NEGs), delete them. Deleting a NEGalso deletesnetworkendpointscontained in the NEG.

  1. In the Google Cloud console, go to theNetwork Endpoint Groups page.

    Go to Network Endpoint Groups

  2. Locate the network endpoint group that you want to delete.

  3. In that row, clickDelete.

Releasing reserved IP addresses

If your load balancer uses one or more a reserved IP addresses, make sure youdelete them.

  1. In the Google Cloud console, go to theExternal IP addresses page.

    Go to External IP addresses

  2. Select the checkboxes next to your reserved IP addresses.

  3. ClickRelease static address.

  4. In the confirmation window, clickDelete.

Deleting the VPC network

If you created a custom VPC network, delete it. Deleting aVPC network also deletes its subnetworks, routes, and firewallrules.

  1. In the Google Cloud console, go to theVPC networks page.

    Go to VPC networks

  2. Click your custom VPC network.

  3. On the network details page, clickDelete VPC network.

  4. In the confirmation window, clickDelete.

Deleting custom firewall rules in the default VPC network

If you created custom firewall rules in the default VPC network,delete them.

  1. In the Google Cloud console, go to theFirewall policies page.

    Go to Firewall policies

  2. Select the checkboxes next to your custom firewall rules.

  3. ClickDelete.

  4. In the confirmation window, clickDelete.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.