All Products
Search
Document Center

Elastic Compute Service:Deprecate or restore an image

Last Updated:Jul 15, 2026

Deprecate a faulty custom image in an image family to fall back to an older version, or restore a deprecated image to active state.

Prerequisites

Two custom images are created and added to the same image family. See Set an image family.

In this example, the image family image-test contains two images: image1 and image2. image2 is the latest active custom image.

Limitations

Deprecated and active images have the following limitations:

  • Unshare a shared custom image before deprecating it.

  • A deprecated custom image can create instances or replace system disks, but cannot be shared or copied.

Deprecate an image in an image family

After you deprecate the latest active custom image in an image family, new ECS instances created from the image family use the next latest active custom image by default.

Important

If an image family contains only one active custom image, deprecating it leaves no active images for instance creation. Proceed with caution.

  1. Go to ECS console - Images.

  2. In the upper-left corner of the page, select a region and resource group.

  3. Deprecate image2 in the image-test image family.

    1. (Optional) In the upper-right corner of the custom images list, click image.png to display image families.

    2. In the Image Family section, click image-test.

    3. In the Actions column for image2, choose 更多操作 > Deprecate Image.

    4. Confirm the deprecation details and click OK.

    5. Verify that the Status column for image2 shows Deprecated.

  4. Log on to the OpenAPI Explorer.

  5. Call DescribeImageFromFamily to query the latest image in a specified image family.

    Query the latest image in image-test. Set the following request parameters:

    • RegionId: The region where the image family resides.

    • ImageFamily: The image family name. Set to image-test.

    The response shows that the latest active image is image1, confirming that image2 is deprecated.

    After a successful call, the ImageName value in the response is image1, indicating that the latest active image in the image family is image1.

    
    "OSName": "CentOS  7.2 64位",
    "IsSupportIoOptimized": true,
    "IsSupportCloudinit": true,
    "ImageName": "image1",
    "DiskDeviceMappings": {
        "DiskDeviceMapping": [
    

Restore an image in an image family

Restore a deprecated custom image in an image family to make it active again.

  1. Go to ECS console - Images.

  2. In the upper-left corner of the page, select a region and resource group.

  3. Restore image2 in the image-test image family.

    1. (Optional) In the upper-right corner of the custom images list, click image.png to display image families.

    2. In the Image Family section, click image-test.

    3. In the Actions column for the deprecated image image2, click 更多操作 and then select Restore Image.

    4. Confirm the restoration details and click OK.

    5. Verify that the Status column for image2 shows Available.

  4. Log on to the OpenAPI Explorer.

  5. Call DescribeImageFromFamily to query the latest image in a specified image family.

    Query the latest image in image-test. Set the following request parameters:

    • RegionId: The region where the image family resides.

    • ImageFamily: The image family name. Set to image-test.

    The response shows that the latest active image is image2, confirming that image2 is restored to active state.

    After calling the API, the ImageName value in the response is image2, indicating that the latest active image in the image family is image2.

    
    "OSName": "CentOS 8.0 64位",
    "IsSupportIoOptimized": true,
    "IsSupportCloudinit": true,
    "ImageName": "image2",
    "DiskDeviceMappings": {
        "DiskDeviceMapping": [