|
| 1 | +--- |
| 2 | +title: Enable Dev Box Auto-Delete to Control Costs |
| 3 | +description: Dev Box autodeletion helps you control costs by removing unused Dev Boxes. Learn how to enable, configure, and cancel autodeletion in Azure. |
| 4 | +#customer intent: As a Dev Box admin, I want to enable auto-deletion for unused Dev Boxes so that I can control costs in my Azure subscription. |
| 5 | +author: RoseHJM |
| 6 | +contributors: null |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 07/11/2025 |
| 9 | +ms.author: rosemalcolm |
| 10 | +ms.reviewer: rosemalcolm |
| 11 | +ms.custom: |
| 12 | + - ai-gen-docs-bap |
| 13 | + - ai-gen-title |
| 14 | + - ai-seo-date:07/11/2025 |
| 15 | + - ai-gen-description |
| 16 | +--- |
| 17 | + |
| 18 | +# Configure Microsoft Dev Box autodeletion |
| 19 | + |
| 20 | +Microsoft Dev Box autodeletion (public preview) helps organizations manage resources and control costs by automatically deleting unused Dev Boxes. This article explains how to enable the feature, configure autodeletion settings, and cancel scheduled deletions in both the Azure portal and developer portal. Use these steps to optimize Dev Box usage in your Azure subscription. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +- Microsoft Dev Box configured with a dev center and at least one project. |
| 25 | + |
| 26 | +## Enable the preview feature |
| 27 | + |
| 28 | +To enable the Dev Box autodeletion feature in your Azure subscription, follow these steps: |
| 29 | + |
| 30 | +1. Go to the Azure subscription where you want to enable the Dev Box autodeletion feature. |
| 31 | +1. In the navigation pane, select **Preview features**. |
| 32 | +1. Type "auto delete" in the search box. |
| 33 | +1. Select **Dev Box Auto Delete Preview**, and follow the prompts to register this feature to your subscription. |
| 34 | + |
| 35 | + After you register the feature, it will be enabled for your subscription. |
| 36 | + |
| 37 | + :::image type="content" source="media/how-to-auto-delete-dev-box/dev-box-auto-delete-enable-preview.png" alt-text="Screenshot of the Azure portal showing the Preview features pane with Dev Box Auto Delete Preview selected."::: |
| 38 | + |
| 39 | +## Set up autodeletion in a project |
| 40 | + |
| 41 | +To configure autodeletion for unused Dev Boxes in a project, follow these steps in the Azure portal: |
| 42 | + |
| 43 | +1. Open an existing Dev Box project, or create a new one in your subscription. |
| 44 | +1. Go to **Settings > Dev box settings**. |
| 45 | +1. Go to the **Cost controls** section. |
| 46 | +1. Select **Automatically delete unused dev boxes**. |
| 47 | +1. Set the following options: |
| 48 | + - Inactivity threshold: Enter the number of inactive days before a Dev Box is scheduled for automatic deletion (for example, 7 days). |
| 49 | + - Grace period: Enter the number of days the developer or admin has to respond and keep the Dev Box (for example, 7 days). |
| 50 | + |
| 51 | + :::image type="content" source="media/how-to-auto-delete-dev-box/dev-box-auto-delete-settings.png" alt-text="Screenshot of the Dev box settings page in Azure portal showing the cost controls section with autodeletion options."::: |
| 52 | + |
| 53 | +## Cancel scheduled deletions in the Azure portal |
| 54 | + |
| 55 | +To cancel a scheduled deletion in the Azure portal, follow these steps: |
| 56 | + |
| 57 | +1. Go to the pool that has your Dev Box scheduled for deletion. |
| 58 | +1. Select that pool to view its Dev Boxes. You need Project Admin access to finish this step. |
| 59 | +1. Select the ellipses (**...**) next to the Dev Box scheduled for deletion. |
| 60 | +1. Select **Cancel deletion**. The selected Dev Box isn't deleted. |
| 61 | + |
| 62 | +:::image type="content" source="media/how-to-auto-delete-dev-box/dev-box-azure-portal-cancel-auto-delete.png" alt-text="Screenshot of the Azure portal showing the pool details and the cancel deletion option for a Dev Box."::: |
| 63 | + |
| 64 | +## Cancel scheduled deletions in the developer portal |
| 65 | + |
| 66 | +Developers get an email notification when their Dev Box is scheduled for deletion after reaching the inactivity threshold. |
| 67 | + |
| 68 | +1. Go to the Dev Box developer portal to cancel the scheduled deletion if you still need the Dev Box. |
| 69 | +1. In the developer portal, find the scheduled deletion notice. |
| 70 | +1. Select **Keep this dev box** to cancel the automatic deletion. |
| 71 | + |
| 72 | +:::image type="content" source="media/how-to-auto-delete-dev-box/dev-box-developer-portal-keep.png" alt-text="Screenshot of the Dev Box developer portal showing the scheduled deletion notice and the option to keep the dev box."::: |
| 73 | + |
| 74 | +## Related content |
| 75 | + |
| 76 | +- [Autostop your Dev Boxes on schedule](how-to-configure-stop-schedule.md) |
0 commit comments