Permanently removes the selected resource from your Vultr account.
Deleting snapshots completely removes the resource from your account. You should only do this operation after restoring a snapshot to a Vultr Cloud Compute instance or after provisioning a Vultr Cloud Compute instance using the snapshot image. After deleting a snapshot, you can't undo the operation, so you should take great care.
Follow this guide to delete snapshots using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List Snapshots endpoint to list all snapshots.
$ curl "https://api.vultr.com/v2/snapshots" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete Snapshot endpoint specifying a snapshot ID to delete a snapshot.
$ curl "https://api.vultr.com/v2/snapshots/snapshot_id" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Visit the Delete Snapshot endpoint to view additional attributes to add to your request.
List all snapshots and note the target snapshot's ID.
$ vultr-cli snapshot list
Delete a snapshot by specifying a snapshot ID.
$ vultr-cli snapshot delete snapshot_id
Run vultr-cli snapshot delete --help
to view all options.
Open your Terraform configuration where the snapshot resource was created.
Remove the vultr_snapshot
resource block, or destroy it by target.
resource "vultr_snapshot" "weekly" {
instance_id = var.instance_id
description = "Weekly-Snapshot-14-08-2024"
}
# To delete, either remove this block from configuration
# or run: terraform destroy -target vultr_snapshot.weekly
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.