Remove image templates and custom image components that are no longer needed to keep your Image Builder workspace tidy. Deleting an image template does not affect images that were already built from it — those images remain available for use.
If an image component is referenced by an image template, you must delete the image template before you can delete the image component.
Prerequisites
Before you begin, make sure that:
The first time you create an image component or image template, the system automatically creates a service-linked role named AliyunServiceRoleForECSImageBuilder. This role grants Image Builder access to the required Alibaba Cloud resources.
(RAM users only) Your Resource Access Management (RAM) user has permissions to manage Image Builder, including the service-linked role. For details, see Manage the service-linked role for Image Builder.
Alibaba Cloud accounts are automatically granted the required permissions.
Delete an image template
You cannot delete a template while an image building task associated with it is in progress. Wait for the task to complete before deleting the template.
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 Templates tab of the Image Builder page, find the image template that you want to delete, then click Delete in the Actions column.
Confirm the information about the image template and click Confirm.
Delete an image component
Only custom image components can be deleted. System image components cannot be deleted. If the component is referenced by an image template, delete the image template first.
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.
Click Custom Components, find the component that you want to delete, then click Delete in the Actions column.
Confirm the information about the image component and click Confirm.
API reference
To delete image templates and components programmatically, use the following API operations:
DeleteImagePipeline: deletes an image template.
DeleteImageComponent: deletes an image component.