# How to Destroy Load Balancers DigitalOcean fully manages Regional Load Balancers and Global Load Balancers, ensuring they are highly available load balancing services. Load balancers distribute traffic to groups of backend resources in specific regions or across different regions, which prevents the health of a service from depending on the health of a single server, cluster, or region. You can destroy a load balancer if you no longer need it. This is a permanent, irreversible action. **Note**: Destroying a load balancer does not destroy the Droplets that were associated with it. You can [destroy these Droplets](https://docs.digitalocean.com/products/droplets/how-to/destroy/index.html.md) separately. ## Delete a Load Balancer Using Automation ## How to Delete a Load Balancer Using the DigitalOcean CLI 1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI. 2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`. 3. Use the token to grant `doctl` access to your DigitalOcean account. ```shell doctl auth init ``` 4. Finally, run `doctl compute load-balancer delete`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/compute/load-balancer/delete/index.html.md) for more details: ```shell doctl compute load-balancer delete [flags] ``` ## How to Delete a Load Balancer Using the DigitalOcean API 1. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with the API. 2. Send a DELETE request to [`https://api.digitalocean.com/v2/load_balancers/{lb_id}`](https://docs.digitalocean.com/reference/api/digitalocean//index.html.md#operation/loadBalancers_delete). ### cURL Using cURL: ```shell curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/load_balancers/4de7ac8b-495b-4884-9a69-1050c6793cd6" ``` ### Go Using [Godo](https://github.com/digitalocean/godo), the official DigitalOcean API client for Go: ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.LoadBalancers.Delete(ctx, "4de7ac8b-495b-4884-9a69-1050c6793cd6") } ``` ### Ruby Using [DropletKit](https://github.com/digitalocean/droplet_kit), the official DigitalOcean API client for Ruby: ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.load_balancers.delete(id: '4de7ac8b-495b-4884-9a69-1050c6793cd6') ``` ### Python Using [PyDo](https://github.com/digitalocean/pydo), the official DigitalOcean API client for Python: ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.load_balancers.delete(lb_id="afda3ad") ``` ## Destroy a Load Balancer Using the Control Panel From the [control panel](https://cloud.digitalocean.com), click **Networking**, then click **Load Balancers** to go to the load balancer overview page. Click the name of the load balancer you want to destroy to go to its index page, then click **Settings**. In the **Destroy** section, click the **Destroy** button. In the **Destroy Load Balancer** window that opens, click **Confirm** to permanently destroy the load balancer.