All Products
Search
Document Center

Object Storage Service:delete-bucket-lifecycle

Last Updated:Mar 20, 2026

Deletes all lifecycle rules of a bucket. After deletion, objects in the bucket are not automatically deleted.

Prerequisites

Before you begin, make sure you have:

Usage notes

  • This command deletes all lifecycle rules of the specified bucket. To review existing rules before deletion, run ossutil api get-bucket-lifecycle --bucket <bucket-name>.

  • After lifecycle rules are deleted, objects in the bucket are not automatically deleted.

Command syntax

ossutil api delete-bucket-lifecycle --bucket <value> [flags]
ParameterTypeDescription
--bucketstringThe name of the bucket.
For a full list of supported flags, see Command-line options.

Examples

Delete all lifecycle rules of examplebucket:

ossutil api delete-bucket-lifecycle --bucket examplebucket

What's next