Deleting a Stack

Delete a stack in Resource Manager. You can't undo the deletion of a stack.


When you delete a stack, its associated resources persist but its associated state file is deleted. Cleaning up the resources associated with a deleted stack can be difficult without the state file, especially when those resources are spread across multiple compartments. To avoid difficult cleanup, we recommend that you release associated resources first by running a destroy job. If the stack has no associated resources, then you can safely delete it without concern about missing state files.
    1. Open the navigation menu and click Developer Services. Under Resource Manager, click Stacks.
    2. On the Stacks page, select the compartment that contains the stack that you want.
    3. Click the name of the stack that you want.
    4. On the Stack details page, go to More actions and then select Delete stack.
    5. Confirm the operation when prompted.
  • Use the oci resource-manager stack delete command and required parameters to delete a stack.

    oci resource-manager stack delete stack-id <stack_OCID>

    For a complete list of parameters and values for CLI commands, see the Command Line Reference for Resource Manager.

  • Use the DeleteStack operation to delete a stack.