Deleting an Instance
On Compute Cloud@Customer, you can delete instances using the Compute Cloud@Customer Console, CLI, and API.
By default, the boot volume of the instance is preserved when you delete (terminate) the instance. You can attach the boot volume to a different instance as a data volume, or use it to create a new instance.
You have the option to permanently delete the attached boot volume when you delete the instance. If you preserve the attached boot volume and then later decide to permanently delete the volume, see Deleting a Boot Volume.
-
On the Compute Cloud@Customer Console Dashboard, in the Compute block, click Instances.
- At the top of the page, select the compartment that contains the instance you want to delete.
-
Click the name of the instance you want to delete.
-
On the instance details page, click Controls (upper right corner), then click Terminate.
-
On confirmation dialog box, do one of the following actions:
- To keep the boot volume: Leave the slider in the default position.
- To permanently delete the boot volume: Move the slider to the right.
- Click Confirm.
-
Under Resources, click Work Request(s) to check the status of the termination.
After the TerminateInstance operation is 100% complete and in state Succeeded, the instance remains visible in the instance list in state Terminated for at least 24 hours, up to 24.5 hours. No further action is needed to terminate the instance.
-
Use the oci compute instance terminate command and required parameters to delete the specified instance.
oci compute instance terminate --instance-id <instance_OCID> [OPTIONS]
To permanently delete the attached boot volume when the instance is terminated, specify
--preserve-boot-volume false
on the command line.Use the
work-requests work-request get
command to check the status of the instance terminate. After theTerminateInstance
operation ispercent-complete
100.0
andstatus
SUCCEEDED
, the instance remains visible in instancelist
orget
inlifecycle-state
TERMINATED
for at least 24 hours, up to 24.5 hours. No further action is needed to terminate the instance.For a complete list of CLI commands, flags, and options, see the Command Line Reference.
Use the TerminateInstance operation to delete the specified instance.
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.