If an image template or image component has an issue, you can delete and then recreate it. If you no longer need an image template or image component, delete it to free up resources.
Prerequisites
The first time you create an image component or an image template, the system automatically creates a service-linked role named AliyunServiceRoleForECSImageBuilder. This role authorizes Image Builder to access required cloud resources. If you are a RAM user, you must manually grant permissions to the RAM user to manage the service-linked role for Image Builder. Root accounts have this permission by default. For more information, see Manage the service-linked role for Image Builder.
Delete an image template
Notes
Before you delete an image template, take note of the following:
You cannot delete an image template when an image building task that uses the template is in progress.
Deleting an image template does not affect images that were built from the template.
Procedure
Go to ECS console - Image Builder.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
On the Image Builder page, click the Image Templates tab. Find the image template to delete and click Delete in the Actions column.
In the confirmation message, click OK.
Delete an image component
Limitations
You can delete only custom image components. You cannot delete system components.
You cannot delete an image component if it is in use by an image template. You must delete the referencing template first.
Procedure
Go to ECS console - Image Builder.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
On the Image Builder page, click the Image Components tab.
On the Custom Components tab, find the image component to delete and click Delete in the Actions column.
In the confirmation message, click OK.
Related API operations
You can also use the following API operations to delete image templates and image components: