To delete an instance named "example-instance" in project "example-project", run:
gdcloud compute instances delete example-instance --project example-project
INDICATEURS FACULTATIFS
--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.
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (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."]]