Deleting an Object Storage Object Version
Delete an object's version from an Object Storage bucket.
Deleting an object's version is permanent. You can't recover a deleted version. See Object Version Deletion for more information.
See Listing Object Versions in a Bucket for information on getting an object version's ID.
- 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 whose version 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 down arrow (Show Object Versions) next to the object entry you want. The list of versions of the object appears. The latest version appears at the top of the list.
- Click the next to the object version and select Delete.
- Confirm the deletion.
The version you deleted no longer appears in the object's list of versions.
Use the oci os object delete command and required parameters as described in Deleting an Object. Include the
version-id
parameter and version ID:oci os object delete --bucket-name bucket_name --name object_name --version-id version_id [OPTIONS]
For example:
oci os object delete --bucket-name MyStandardBucket --name MyTextDocument.txt delete --version-id 8d8f06ef-e0c2-4435-bea6-f7c3ec80a444 Are you sure you want to delete this resource? [y/N]: y
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. Include the
versionId
attribute and the version ID.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.