Skip to main content
This guide covers releasing (terminating) an Alibaba Cloud ECS (Elastic Compute Service) instance. Releasing an instance permanently deletes it and its associated system disk. Data disks are not deleted unless you explicitly select that option.
Alibaba Cloud calls this operation “release” (释放) rather than “terminate.” The result is the same: the instance is permanently deleted and billing stops.
Complete the pre-termination checklist before proceeding. Releasing an instance is irreversible.

Before you start: check Release Protection

If Release Protection is enabled on the instance, the release operation will fail. Check and disable it first:
  1. In the ECS console, click the instance name to open its details.
  2. In the Instance Details tab, look for Release Protection under the Settings section.
  3. If enabled, click the edit icon and switch it off.
Official documentation: Enable or disable release protection

Option 1: Alibaba Cloud Console

1

Open the ECS console

Sign in to the Alibaba Cloud ECS Console and navigate to Instances & Images → Instances.
2

Select the correct region

Use the region dropdown at the top to select the region where your instance is running.
3

Select your instance

Locate the ECS instance running OpenClaw. Confirm the correct instance by checking its public IP address against what appeared on the watchboard.
4

Release the instance

Click More → Instance Status → Release. In the dialog, choose Release Now. Optionally check Release attached data disks if you also want to delete data disks.Click Next → OK to confirm.
Official Alibaba Cloud documentation: Release an instance

Option 2: Alibaba Cloud CLI (aliyun)

If you have the Alibaba Cloud CLI installed:
# List instances to find the instance ID
aliyun ecs DescribeInstances \
  --RegionId cn-REGION \
  --output cols=InstanceId,PublicIpAddress,Status rows=Instances.Instance[]

# Release (delete) the instance
aliyun ecs DeleteInstance \
  --InstanceId i-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION
To also release attached data disks:
aliyun ecs DeleteInstance \
  --InstanceId i-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION \
  --TerminateSubscription true
Official API reference: DeleteInstance

Post-termination cleanup

Delete unattached data disks

Data disks that were not deleted during instance release continue to incur charges. In the ECS console, navigate to Storage & Snapshots → Disks, filter by Status = Available, and release them.
aliyun ecs DeleteDisk --DiskId d-XXXXXXXXXXXXXXXXX

Delete snapshots

# List snapshots
aliyun ecs DescribeSnapshots --RegionId cn-REGION

# Delete a snapshot
aliyun ecs DeleteSnapshot --SnapshotId s-XXXXXXXXXXXXXXXXX

Release Elastic IPs (EIPs)

Unassociated EIPs incur charges. In the console, navigate to VPC → Elastic IP Addresses and release them.
aliyun vpc ReleaseEipAddress \
  --AllocationId eip-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION

Delete custom images

# List custom images
aliyun ecs DescribeImages --ImageOwnerAlias self --RegionId cn-REGION

# Delete an image
aliyun ecs DeleteImage --ImageId img-XXXXXXXXXXXXXXXXX --RegionId cn-REGION

Rotate credentials

After releasing the instance, rotate everything the agent had access to. See the post-termination checklist for the full list.