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.
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.