To delete an instance named "example-instance" in project "example-project", run:
gdcloud compute instances delete example-instance --project example-project
OPTIONAL FLAGS
--delete-disks DISK_TYPE The types of disks to delete with instance deletion regardless of the
disks' auto-delete configuration on the VM instance. When this flag is
provided, the auto-delete bits on the attached disks are modified
accordingly before the instance deletion request is issued.
DISK_TYPE must be one of:
all: All disks
boot: Only the disks where first partition is reserved for the root filesystem
data: Only non-boot disks
The default is to leave the auto-delete bits on the attached disks unchanged.
--keep-disks DISK_TYPE The types of disks to NOT delete with instance deletion regardless of
the disks' auto-delete configuration on the VM instance. When this flag
is provided, the auto-delete bits on the attached disks are modified
accordingly before the instance deletion request is issued.
DISK_TYPE must be one of:
all: All disks
boot: Only the disks where first partition is reserved for the root filesystem
data: Only non-boot disks
The default is to leave the auto-delete bits on the attached disks unchanged.
GDCLOUD WIDE FLAGS
These flags are available to all commands: --configuration, --format, --help, --project, --quiet.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud compute instances delete\u003c/code\u003e command is used to delete virtual machine instances.\u003c/p\u003e\n"],["\u003cp\u003eYou must specify the \u003ccode\u003eINSTANCE_NAME\u003c/code\u003e when using this command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--delete-disks\u003c/code\u003e flag allows you to specify which types of disks to delete alongside the instance, including all, boot, or data disks, regardless of their auto-delete settings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--keep-disks\u003c/code\u003e flag allows you to specify which types of disks to keep when deleting the instance, regardless of their auto-delete settings, and options are all, boot, or data disks.\u003c/p\u003e\n"],["\u003cp\u003eSeveral gdcloud-wide flags, such as \u003ccode\u003e--project\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, and \u003ccode\u003e--help\u003c/code\u003e, can also be used with this command.\u003c/p\u003e\n"]]],[],null,["# gdcloud compute instances delete\n\nNAME\n----\n\ngdcloud compute instances delete - Delete virtual machine instances.\n\nSYNOPSIS\n--------\n\n gdcloud compute instances delete INSTANCE_NAME [flags]\n\n### EXAMPLES\n\n To delete an instance named \"example-instance\" in project \"example-project\", run:\n\n gdcloud compute instances delete example-instance --project example-project\n\n### OPTIONAL FLAGS\n\n --delete-disks DISK_TYPE The types of disks to delete with instance deletion regardless of the\n disks' auto-delete configuration on the VM instance. When this flag is\n provided, the auto-delete bits on the attached disks are modified\n accordingly before the instance deletion request is issued.\n \n DISK_TYPE must be one of:\n all: All disks\n boot: Only the disks where first partition is reserved for the root filesystem\n data: Only non-boot disks\n The default is to leave the auto-delete bits on the attached disks unchanged.\n --keep-disks DISK_TYPE The types of disks to NOT delete with instance deletion regardless of\n the disks' auto-delete configuration on the VM instance. When this flag\n is provided, the auto-delete bits on the attached disks are modified\n accordingly before the instance deletion request is issued.\n \n DISK_TYPE must be one of:\n all: All disks\n boot: Only the disks where first partition is reserved for the root filesystem\n data: Only non-boot disks\n The default is to leave the auto-delete bits on the attached disks unchanged.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]