Deleting Resources

Delete found resources in bulk rather than individually.

  • These steps assume that you already have resource results. You got resource results by doing one of the following:
    1. Do one of the following:
      • To delete all resources in the list of results, select the checkbox in the table header in the leftmost column. Repeat this for any remaining pages of results. (You can navigate to the next page of results by clicking the lower right arrow at the bottom of the table.)
      • To delete only some resources in the list of results, select the checkbox in the leftmost column next to the display name of each result you want to delete.
    2. Click Actions.
    3. Click Delete resources.
    4. If any resources that you selected can't be deleted as part of a bulk action, the Console displays them and the reasons why. Review the list, and then click Next.
    5. Review the list of resources that can be deleted as part of the bulk action, and then click Delete resources.
    6. To confirm, click Delete.
  • Use the bulk-delete-resources command and required parameters to delete resources in bulk:

    oci iam compartment bulk-delete-resources --compartment-id <compartment_OCID> --resources <resources_to_delete_in_JSON_format>
    For example:
    oci iam compartment bulk-delete-resources --compartment-id ocid1.compartment.oc1..<unique_id> --resources file://path/to/resourcestodelete.json

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

  • Run the BulkDeleteResources operation to delete resources in bulk.