#remove_rule(rule_or_rule_id) ⇒ nil

# remove a single rule by its ID
bucket.lifecycle_configuration.updatedoremove_rule('rule-id')end# remove all disabled rules
bucket.lifecycle_configuration.updatedorules.eachdo|rule|remove_rule(rule)ifrule.disabled?endend

If you call #remove_rule outside an update block
you need to call #update to save the changes.