Recover accidentally deleted images, with configurable retention and grace periods and new lifecycle visibility
At Microsoft Ignite, we're excited to announce the general availability (GA) of soft delete in Azure Compute Gallery (ACG). Last year, we introduced soft delete in public preview as part of our investments in image resiliency. Since then, we've listened closely to your feedback. Soft delete reaches GA with new capabilities that give you more control over how long deleted images stay recoverable, more flexibility to keep workloads running while you decide, and more visibility into where each image sits in its lifecycle.
Why soft delete matters
Accidental deletion of a VM image can break deployment pipelines, block scale-out operations and force teams to rebuild and revalidate images from scratch. Before Soft Delete, deleting an image version from Azure Compute Gallery was permanent.
With Soft Delete enabled, a deleted image version isn't immediately removed; it enters a soft-deleted state and remains recoverable until it is permanently deleted. Soft Delete is available for private galleries, direct shared galleries and community galleries.
What's new at GA:
- Configurable retention period (up to 365 days)
During the preview, deleted images were recoverable for a fixed seven days. You can now set the retention period from 7 to 365 days (default seven days).
- New grace period (up to 90 days)
When the retention period expires, a grace period begins in which the image is still recoverable but can no longer be consumed. Configure it from 7 to 90 days (default seven days).
- Keep deploying during retention
With API version 2026-03-03, a soft-deleted image remains available for consumption during the retention period: you can still create VMs and virtual machine scale sets and scale out existing scale sets. With earlier API versions, these operations were blocked during the retention period. Consumption is blocked only once the grace period begins, giving you a window to discover any remaining dependencies while the image is still recoverable.
- Lifecycle visibility
Listing soft-deleted images now returns new properties: softDeleteTime, consumptionEndTime, hardDeletionTargetTime.
|
Property |
What it tells you |
|
softDeleteTime |
When the image was soft deleted. |
|
consumptionEndTime |
When the retention period ends. |
|
hardDeletionTargetTime |
When the grace period ends and the image is scheduled for permanent deletion. |
You can use these timestamps to see how long you have to recover an image before it's permanently removed.
- Bypass soft delete when you need to
While bypassing soft delete is not recommended, a new optional bypassSoftDelete query parameter lets you permanently delete an active image version immediately when you don't need the recovery window. You can also hard delete an image already in the soft-deleted state without waiting for the retention and grace periods to end.
Image lifecycle with soft delete enabled
|
Stage |
Duration |
Can you deploy from it? |
Can you recover it? |
|
Active |
— |
Yes |
Not applicable |
|
Soft deleted: retention period |
7 - 365 days, default 7 |
Yes (API version 2026-03-03) |
Yes |
|
Soft deleted: grace period |
7 - 90 days, default 7 |
No |
Yes |
|
Permanently deleted |
Platform deletes the image when the grace period ends |
No |
No |
A soft-deleted image remains consumable until consumptionEndTime and recoverable until hardDeletionTargetTime.
Getting started
Create a Gallery with soft delete enabled:
- From Azure Portal, Search for Azure Compute Gallery
- Create Azure Compute Gallery and enable Soft delete for image versions, and configure retention period and grace period
- Review and Create
Enable soft delete on an existing gallery:
- Open the gallery for which you want to enable soft delete.
- Select the soft delete tab, select “enables soft delete for image versions” and customize the retention period and grace period and save.
Soft delete an image version:
- Open Image definition and select the version you want to delete and click Delete.
List the soft deleted image versions in the image definition:
- From the Image definition blade, toggle the switch “show soft deleted versions” to list all the soft deleted images in a Image definition.
Recover the deleted image:
- From the Image definition blade, toggle the switch “show soft deleted versions” to list all the soft deleted images in a Image definition.
- Select the image version you want to recover and click “Undelete” button to recover the image.
Permanently delete the image version:
- From the Image definition blade, toggle the switch “show soft deleted versions” to list all the soft deleted images in a Image definition.
- Select the image version you want to permanently delete and click “delete” button to recover the image.
Common operations
- Soft delete an image version: send DELETE on the image version
- List soft-deleted images: send GET on .../softDeletedArtifactTypes/Images/artifacts/{image-definition-name}/versions, or toggle "Show soft deleted versions" in the portal. Run the following ARG query to list all the soft deleted image versions across all galleries:
Computeartifactresources
| where type =~ "microsoft.compute/galleries/softdeletedartifacttypes/artifacts/versions
- Recover an image: send PUT on the image version with its home region any time before hardDeletionTargetTime, or select Undelete in the portal.
- Permanently delete: send DELETE with bypassSoftDelete=true for an active image, or DELETE on the soft-deleted artifact; in the portal, select the soft-deleted version and then Delete.
Good to know
- Only subscription owners, or users and service principals assigned the Compute Gallery Sharing Admin role at the subscription or gallery level, can enable soft delete.
- Soft delete takes effect immediately once enabled on a gallery.
- Billing: Soft delete is free. The replica count doesn't reduce when an image is soft deleted, and you're charged for all retained replicas until the image is permanently deleted.
- Quota: Soft-deleted image versions continue to count against your quota. Quota is released only after the image version is permanently deleted.
Conclusion
Soft delete gives Azure Compute Gallery customers a reliable safety net for their images and raises the baseline for image protection and availability.
Enable soft delete on your galleries today, set retention and grace periods that match your operational and compliance needs, and share your feedback in the comments.
Learn more
- Soft delete in Azure Compute Gallery documentation: https://aka.ms/sigsoftdelete
- Previous post – Enhancing Resiliency in Azure Compute Gallery (Azure Compute Blog, Nov 18, 2025): https://techcommunity.microsoft.com/blog/azurecompute/enhancing-resiliency-in-azure-compute-gallery/4470082