A Container Registry Enterprise Edition instance allows you to enable garbage collection to delete image tags that you no longer require to release the occupied storage capacity of an Object Storage Service (OSS) bucket.
Usage notes
Before you create a garbage collection task, carefully read the instructions in the documentation and the Container Registry console.
Image tags cannot be recovered after they are deleted. Before you delete image tags, make sure that the key images can be regenerated and pushed.
Do not perform any operation on the OSS bucket that stores the Container Registry Enterprise Edition data during or after a garbage collection task.
Step 1: Enable garbage collection
To enable garbage collection, perform the following steps:
Log on to the Container Registry console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Instances.
On the Instances page, click the Enterprise Edition instance that you want to manage.
On the management page of the Container Registry Enterprise Edition instance, choose .
On the Garbage Collection page, click Execute.
In the Confirmation dialog box, click Submit Ticket to enable garbage collection.
ImportantThe first time you perform a garbage collection task, click Submit Ticket in the Confirmation dialog box to add your Alibaba Cloud account to the whitelist. You do not need to repeat this operation after garbage collection is enabled.
Step 2: Create a garbage collection task
You can still pull images from image repositories during the garbage collection task.
You can perform garbage collection tasks only for Container Registry Enterprise Edition instances. When you perform a single garbage collection task on a Container Registry Enterprise Edition instance, expired image tags in all image repositories are deleted from the OSS bucket. Expired chart tags in all chart repositories are not deleted from OSS buckets.
Perform the following steps to create a garbage collection task.
Log on to the Container Registry console.
In the top navigation bar, select a region.
In the left-side navigation pane, click Instances.
On the Instances page, click the Enterprise Edition instance that you want to manage.
In the left-side navigation pane of the Container Registry Enterprise Edition instance, choose .
On the Garbage Collection page, click Execute. In the Confirmation message that appears, read the precautions, select Confirm to clean up, and click Confirm to create a garbage collection task.
Result
In the left-side navigation pane of the Container Registry Enterprise Edition instance, choose to view or cancel the garbage collection task that you created.
After the garbage collection task is complete, the storage capacity of the OSS bucket does not change immediately. The storage capacity changes after a specific number of days based on the lifecycle rules configured for the bucket.