Learn how to permanently remove a Vultr Optimized Cloud Compute instance from your account.
Deleting an instance permanently erases the server's file system and removes all IP information. This action is irreversible and any data on the instance data is lost unless a backup or snapshot is available in your Vultr account.
Follow this guide to delete a Vultr Optimized Cloud Compute instance using the Vultr Customer Portal, API, or CLI.
Send a GET
request to the List Instances endpoint and note your target instance's ID.
$ curl "https://api.vultr.com/v2/instances" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete Instance endpoint to delete the instance.
$ curl "https://api.vultr.com/v2/instances/{instance-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List all available instances and note your target instance's ID.
$ vultr-cli instance list
Delete the target instance.
$ vultr-cli instance delete <instance_id>
Open your Terraform configuration and locate the Optimized Cloud Compute instance resource.
Remove the resource block or set its lifecycle to destroy.
resource "vultr_instance" "occ" {
label = "occ-instance-1"
region = "del"
plan = "vhp-2c-4gb"
os_id = 2284
hostname = "occ-instance-1"
}
# To delete, either remove this block from configuration
# or run: terraform destroy -target vultr_instance.occ
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
No comments yet.