How to Delete a Vultr Cloud Compute Instance
-
by Blog Admin
- 18
How to Delete a Vultr Cloud Compute Instance
Learn how to permanently remove a Vultr 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 Cloud Compute instance using the Vultr Customer Portal, API, CLI, or Terraform.
Deleting an instance is permanent and irreversible. Take a snapshot of the instance if want to recover the instance at a later time.
Vultr Customer Portal
- Navigate to Products and click Compute.
- Click your target Vultr Cloud Compute instance to open its management page.
- Click Destroy Server on the top-right navigation menu to delete the server instance.
- Check the confirmation prompt and click Destroy Server to apply changes.
Vultr API
- Send a
GET
request to the List Instances endpoint and note your target instance’s ID.console$ 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.console$ curl "https://api.vultr.com/v2/instances/{instance-id}" \ -X DELETE \ -H "Authorization: Bearer ${VULTR_API_KEY}"
Vultr CLI
- List all available instances and note your target instance’s ID.
console
$ vultr-cli instance list
- Delete the target instance.
console
$ vultr-cli instance delete <instance_id>
Terraform
- Open your Terraform configuration and locate the Cloud Compute instance resource.
- Remove the resource block or set its lifecycle to destroy.
terraform
resource "vultr_instance" "cc" { label = "cc-instance-1" region = "del" plan = "vc2-2c-4gb" os_id = 2284 hostname = "cc-instance-1" } # To delete, either remove this block from configuration # or run: terraform destroy -target vultr_instance.cc
- Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
How to Delete a Vultr Cloud Compute Instance Learn how to permanently remove a Vultr 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…
How to Delete a Vultr Cloud Compute Instance Learn how to permanently remove a Vultr 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…