Bulk Deleting All Objects in a Bucket
On Compute Cloud@Customer, you can delete all objects in a bucket using the CLI.
You can't recover a deleted object unless you have object versioning enabled. See Managing Object Versioning for details.
You can't delete an object that has an active retention rule. See Defining Retention Rules for details.
Using the CLI
Use the oci os object bulk-delete command and required parameters to delete an object or folder.
To see a list of the files impacted by a bulk delete command without actually deleting
the files, use the --dry-run
option. Perform the command without the
--dry-run
option to bulk delete all objects in the bucket.
oci os object bulk-delete --namespace-name <object_storage_namespace> --bucket-name <bucket_name> --dry-run
For a complete list of CLI commands, flags, and options, see the Command Line Reference.