Deleting an Object Storage Object
Delete one or more objects from an Object Storage bucket
You can permanently delete an object from a bucket or folder. You can't, however, recover a deleted object unless you have object versioning enabled. See Object Storage Versioning for details.
- Open the navigation menu and click Storage. Under Object Storage & Archive Storage, click Buckets.
- Select the compartment from the list under List Scope. All buckets in that compartment are listed in tabular form.
- Click the bucket whose object you want to delete. The bucket's Details page appears.
- Click Objects under Resources. The Objects list appears. All folders and objects are listed in tabular form.
- Click the next the object you want to delete, and select Delete. To delete multiple objects, select the check boxes next to the object names and select Delete from the More Actions menu.
- Confirm the deletion.
Use the oci os object delete command and required parameters to delete an object from a bucket:
oci os object delete --bucket-name bucket_name --name object_name [OPTIONS]
For example:
oci os object delete --bucket-name MyBucket --name MyFile.txt Are you sure you want to delete this resource? [y/N]: y
The object is deleted with no further information returned.
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the DeleteObject operation to delete an object from a bucket.
Object Storage prepends the Object Storage namespace string and bucket name to the object name when constructing a URL for use with the API:
/n/object_storage_namespace/b/bucket/o/object_name
The object name is everything after the
/o/
, which could include hierarchy levels and prefix strings.