Scenarios
When versioning is enabled and Historical Versions is disabled, deleting objects (either with More > Delete for a single object or Delete above the object list for multiple objects, without specifying a version ID) does not remove them permanently. Instead, OBS inserts a delete marker for each object. The delete marker becomes the current version, while the previous current version becomes a historical version. You can then enable Historical Versions to view these delete markers.
Figure 1 An object's delete marker and historical versions
A delete marker does not occupy storage, so it is not billed. However, if all historical versions of an object have been deleted, keeping only the delete marker is meaningless and can degrade OBS bucket performance. In this case, the delete marker is considered expired, and it is recommended to remove expired delete markers promptly.
Constraints
If you use tags as filter criteria or configure deletion upon expiration for the current version in a lifecycle rule, you cannot also configure automatic removal of expired delete markers in that rule.
Prerequisites
- Versioning is enabled or suspended.
- All historical object versions have been permanently deleted, and only one delete marker remains.

Manually Removing Expired Delete Markers
You can use OBS Console, APIs, or SDKs to manually remove expired delete markers.
Using OBS Console
- In the navigation pane of OBS Console, choose Buckets.
- In the bucket list, click the desired bucket. The Objects page is displayed.
- Enable Historical Versions above the object list.
- In the Last Modified column, locate the object with Delete Marker and click Permanently Delete in the Operation column.
You can also select all objects with Delete Marker and click Permanently Delete above the object list to delete them in a batch.
- In the displayed dialog box, click OK.
Using SDKs
Using the SDK for BrowserJS to interact with OBS exposes the AK and SK on the frontend, which introduces security risks. To avoid this, the frontend can use a temporarily signed URL generated by the backend to access OBS. For details, see How Do I Interact with OBS Without Exposing My AK and SK?
Configuring a Lifecycle Rule to Remove Expired Delete Markers
You can use OBS Console, APIs, or SDKs to configure a lifecycle rule that automatically removes expired delete markers.
Using OBS Console
- In the navigation pane of OBS Console, choose Buckets.
- In the bucket list, click the bucket you want to operate. The Objects page is displayed.
- In the navigation pane, choose Data Management > Lifecycle Rules.
- Click Create. The Create Lifecycle Rule dialog box is displayed.
- Configure the parameters listed in the following table as instructed. You can configure other parameters as needed by referring to Creating a Lifecycle Rule.

Table 1 Parameters under Basic Information | Parameter | Value Example | Description |
| Status | Enabled | Whether to enable the lifecycle rule - If Status is enabled, the lifecycle rule will be applied to affected objects as scheduled. The actions that can be triggered include storage class transitions, object deletion, fragment deletion, and removal of expired delete markers.
- If Status is disabled, the lifecycle rule will not be applied.
|
| Rule Name | rule-925d | The name of the lifecycle rule A rule name: - Can be up to 255 characters long.
- Can include only uppercase letters, lowercase letters, digits, periods (.), underscores (_), and hyphens (-).
|
| Scope | All objects | The scope of objects the lifecycle rule applies to - Objects with specified prefix: The rule applies to the objects with the specified prefix in the bucket.
- All objects: The rule applies to all objects in the bucket.
Multiple lifecycle rules may overlap. In such cases, the overlapping must comply with the predefined constraints. Otherwise, conflicting rules can cause the configuration to fail. |
| Current Version | Disabled | Whether to enable settings for Current Version - With Status enabled, you can add a maximum of four settings.
- With Status disabled, you do not need to make any settings.
|
| Historical Version | Disabled | Whether to enable settings for Historical Version - With Status enabled, you can add a maximum of four settings.
- With Status disabled, you do not need to make any settings.
|
| Remove Expired Delete Marker | Enabled | An expired delete marker is the only delete marker that remains after all historical versions of an object have been deleted. This action will remove expired delete markers to improve performance. Status: whether to remove expired delete markers. When it is enabled, expired delete markers are automatically deleted; when disabled, they are not. If you use tags as filter criteria or configure deletion upon expiration for the current version, you cannot also configure automatic removal of expired delete markers in the same rule. |
- Select "I have confirmed these lifecycle rule configurations and understand how they may impact my costs."
- Click OK to complete the lifecycle rule configuration.