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:
- You accessed a resource collection from the home page or according to the instructions in Getting a Resource Collection's Details.
- You performed a free text search and selected the Resources category of results according to the instructions in Performing a Free Text Search
- You ran an advanced resource query according to the instructions in Running a Custom, Free-Form Query.
-
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.
- Click Actions.
- Click Delete resources.
- 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.
- Review the list of resources that can be deleted as part of the bulk action, and then click Delete resources.
- 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.