tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Clearing Bucket

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-09-02 11:13:54

Overview

You can clear the specified bucket in the COS console. For more information on buckets, see Bucket Overview.
Note:
Clearing a bucket will delete all objects and incomplete multipart uploads in this bucket. The deleted data is unrecoverable and inaccessible. Proceed with caution.

Use Cases

Clearing a bucket through a lifecycle rule: This method is applicable to a bucket with more than 10,000 objects. A deletion job will be triggered when the trigger condition of a lifecycle rule is met. The job start and completion time are subject to the lifecycle rule configuration in the console.
Quickly clearing a bucket in the console: This method is applicable to a bucket with less than 10,000 objects. A bucket clearing job will take effect immediately upon completion.
Note:
If you have a large amount of data in your bucket, clearing the bucket using the console may be slow or even fail due to network reasons. In this case, we recommend you clear the bucket by setting lifecycle configuration.

Directions

Quickly clearing a bucket in the console

1. Log in to the COS console.
2. Click Bucket List on the left sidebar.
3. Find the target bucket and click More > Clear Data on the right.
4. In the pop-up window, enter the name of the bucket you want to clear and click Confirm.
5. In the pop-up window, click OK.

Clearing a bucket through a lifecycle rule

1. Log in to the COS console.
2. Click Bucket List on the left sidebar.
3. Locate the bucket for which you want to set the lifecycle feature. Click the bucket name to enter its details page.
4. Click Basic Configurations > Lifecycle and click Add a Rule.
5. In the Add Rule dialog box, set rules to delete all current version files and historical versions in the entire bucket. Configuration as follows:
Basic information:
Status: Enabled.
Rule name: Required. Enter your lifecycle rule name.
Policy type: Select "Last modification time". If you have enabled the allowlist feature for access tracking, this configuration item will be displayed. If this configuration item is not present, the default policy type is last modification time without requiring selection. For more information, see Setting lifecycle.
Application scope: Select entire bucket.
Exclusion range: Off.
Rule configuration:
Manage current version files: Set deletion 1 day after file modification time.
Manage files of noncurrent version: Set deletion 1 day after file modification time.
Delete fragments: Set deletion 1 day after fragment creation.
Note:
Since deleting bucket data is a high-risk operation, secondary confirmation is required. Click OK to proceed.
6. You can see that the deletion rule has been set successfully in the lifecycle rule list.
7. After the lifecycle rule is executed, you can see that both the number and volume of stored objects are zero on the bucket overview page, indicating that the bucket has been cleared. If you no longer use the bucket, you can delete it.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan