All Products
Search
Document Center

Elastic Compute Service:Delete a custom image

Last Updated:Apr 07, 2024

You can delete custom images that you no longer need. This topic describes how to delete a custom image.

Considerations

Before you delete a custom image, take note of the items that are described in the following table for different operations.

Operation

Item

Delete a custom image

  • A custom image cannot be deleted in the following scenarios:

    • The image is being imported. You can go to the Task Management page in the Elastic Compute Service (ECS) console to cancel the image import task. After the image import task is canceled, you can delete the image. For more information, see Import custom images.

    • The image is being exported. You can go to the Task Management page in the ECS console to cancel the image export task. After the image export task is canceled, you can delete the image. For more information, see Export a custom image.

  • After a custom image is deleted, the following situations occur:

    • The image can no longer be used to create instances.

    • Instances that use the image can still be used and continue to generate fees. The system disks of instances that use the image cannot be re-initialized. For more information, see Re-initialize a system disk.

    • If you delete a custom image that is shared with other users, the other users can no longer view and use the image to create instances. The system disks of instances that use the image can no longer be re-initialized.

    • If you delete a custom image that is published as a community image, the community image is also deleted and cannot be used to create instances. The system disks of instances that use the community image can no longer be re-initialized.

Delete a shared image

  • Before you can delete a shared image, you must unshare the image. For more information, see Unshare images.

  • After a shared image is deleted, the following situations occur:

    • Accounts to which the image was shared cannot query the image in the ECS console or by calling an API operation.

    • Accounts to which the image was shared cannot use the image to create instances or replace the operating systems (system disks) of instances. For information about how to replace operating systems, see Replace the operating system (system disk) of an instance.

    • Accounts to which the image was shared cannot re-initialize the system disks of instances that use the image. For more information, see Re-initialize a system disk.

Delete an image copy

  • If an image that has been copied is deleted, the image copies are not affected. Note that ongoing image copy tasks can be canceled but cannot be deleted.

  • If the copies of an image are deleted, the image is not affected.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Images.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the Custom Images tab, find the image that you want to delete and click Delete Image in the Actions column.

    You can also select one or more custom images and click Delete Image in the lower part of the tab.

  5. In the Delete Image dialog box, delete the image as prompted.

    Important
    • When you import a custom image, a snapshot is created for the image. You can choose whether to retain the snapshot when you delete the image. Deleted snapshots can no longer be used to restore data. Proceed with caution.

    • You are charged for existing snapshots. To delete snapshots, go to the Snapshots page in the ECS console. For more information, see Delete a snapshot. For information about the billing of snapshots, see Snapshots.

    Delete snapshots that were created based on the image

    If you want to delete the snapshots together with the image, select Yes in the Delete Snapshots section.

    image.png

    Delete instances that were created from the image

    If the image has been used to create instances, select Forcefully Delete Image, set Delete Snapshots to Yes or No based on your business requirements, and then click Confirm.

    image.png