You can delete custom images that are no longer needed.

Background information

Before you delete a custom image, take note of the items 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 Logs 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 Logs 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.
    • The image is being used by ECS instances.
  • After a custom image is deleted, the following situations occur:
    • The image can no longer be used to create instances.
    • The instances that use the image can still be used and continue to incur charges. However, the system disks of the instances cannot be re-initialized. For more information, see Re-initialize a system disk.
Delete a shared image
  • Before you can delete a shared image, you must unshare the image. For more information, see Unshare custom images.
  • After a shared image is deleted, the following situations occur:
    • Accounts to which the image was shared can no longer query the image by using the ECS console or by calling an API operation.
    • Accounts to which the image was shared can no longer use the image to create ECS instances or replace the system disks of ECS instances. For information about how to replace the system disk of an ECS instance, see Replace the operating system of an instance.
    • If accounts to which the image was shared have created ECS instances from the image, the system disks of the instances can no longer be re-initialized. 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 and 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 a region.
  4. On the Images page, click the Custom Images tab. Find the custom image that you want to delete and choose More > 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, confirm the information of the images and optionally select Delete Snapshots Contained Within Images.
    Important Deleted snapshots can no longer be used to restore data. Proceed with caution.
  6. Click OK.