# How to Delete Snapshots Snapshots are on-demand disk images of DigitalOcean Droplets and volumes saved to your account. Use them to create new Droplets and volumes with the same contents. Snapshots remain in your account until you manually delete them. Deleting a snapshot does not affect the usability of any other snapshots. ## Delete a Snapshot using Automation ## How to Delete a Snapshot 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 snapshot delete`. Basic usage looks like this, but you can [read the usage docs](https://docs.digitalocean.com/reference/doctl/reference/compute/snapshot/delete/index.html.md) for more details: ```shell doctl compute snapshot delete ... [flags] ``` The following example deletes a Droplet snapshot with ID `386734086`: ```shell doctl compute snapshot delete 386734086 ``` ## How to Delete a Snapshot 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/snapshots/{snapshot_id}`](https://docs.digitalocean.com/reference/api/digitalocean//index.html.md#operation/snapshots_delete). ### cURL Using cURL: ```shell curl -X DELETE \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41" ``` ### 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.Snapshots.Delete(ctx, 'fbe805e8-866b-11e6-96bf-000f53315a41') } ``` ### 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.snapshots.delete(id: 'fbe805e8-866b-11e6-96bf-000f53315a41') ``` ### 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.snapshots.delete(snapshot_id="fbe805e8") ``` ## Delete a Snapshot using the Control Panel To delete a snapshot from your team, in the control panel’s left menu, click **Backups & Snapshots**. The **Snapshots** tab lists all snapshots in your account. Snapshots are separated into two lists: one for Droplet snapshots and one for volume snapshots. To remove a snapshot, open its **More** menu and click **Delete**. In the confirmation window that opens, click **Delete Snapshot** to permanently delete the snapshot.