All Products
Search
Document Center

Container Registry:Clean up OSS bucket storage

Last Updated:Apr 24, 2026

Enterprise Edition instances provide a garbage collection feature to clean up unused image versions and reclaim storage space in your OSS bucket. This topic describes how to use the garbage collection feature to free up storage space in an OSS bucket.

Before you begin

Important
  • Before running a garbage collection task, carefully read these instructions and the prompts in the Confirmation dialog box. Do not proceed until you confirm all information is correct.

  • Deleted image data cannot be recovered. Before starting, ensure that you can regenerate and push any critical images if necessary.

  • Do not modify the OSS bucket associated with the instance during or after garbage collection.

Step 1: Enable the garbage collection feature

To enable the garbage collection feature, submit a ticket.

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.

  5. In the navigation pane on the left, choose Instances > Garbage Collection.

  6. On the Garbage Collection page, click Execute .

  7. In the Confirmation dialog box, click Submit Ticket to enable the garbage collection feature.

    Important

    If this is your first time performing this operation, click Submit Ticket in the Confirmation dialog box to add your account to the whitelist. This is a one-time operation.

Step 2: Create a garbage collection task

Note
  • Clients can continue to push and pull images without interruption while a garbage collection task is running.

  • Garbage collection tasks run at the level of an Enterprise Edition instance. A single task removes invalid image versions from all image repositories within the instance, excluding chart repositories.

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.

  5. In the navigation pane on the left, choose Instances > Garbage Collection.

  6. On the Garbage Collection page, click Execute . Carefully read the notice in the Confirmation dialog box. After you confirm the information, select Confirm to clean up and then click Confirm.

Execution results

  • In the navigation pane on the left, go to Instances > Garbage Collection. On this page, you can view the task status or cancel the task.

  • After the garbage collection task is complete, the storage usage of the OSS bucket does not decrease immediately. The space is reclaimed according to the bucket's configured lifecycle rule.