Skip to content

Delete a Snapshot

client.gpuDroplets.snapshots.delete(number | stringsnapshotID, RequestOptionsoptions?): void
delete/v2/snapshots/{snapshot_id}

Both Droplet and volume snapshots are managed through the /v2/snapshots/ endpoint. To delete a snapshot, send a DELETE request to /v2/snapshots/$SNAPSHOT_ID.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

ParametersExpand Collapse
snapshotID: number | string

The ID of a Droplet snapshot.

Accepts one of the following:
number
string
Delete a Snapshot
import Gradient from '@digitalocean/gradient';

const client = new Gradient({
  accessToken: 'My Access Token',
});

await client.gpuDroplets.snapshots.delete(6372321);
Returns Examples