Azure CLI Extensions az extensions by Jon Gallant
Back to Home

az group bulk-delete

Bulk delete Azure resource groups by tag. Shows the target subscription, lists matching resource groups, and prompts for confirmation before deleting. Includes a live status dashboard that tracks deletion progress, and an interactive mode to pick resource groups from a list.

Installation

1. Configure the extension index (one time):

az config set extension.index_url=https://jongio.github.io/az-extensions/index.json

2. Install:

az extension add --name group-bulk-delete

3. Update to latest:

az extension update --name group-bulk-delete

Usage

Bulk delete all resource groups tagged with "delete"

az group bulk-delete

Skip all confirmation prompts

az group bulk-delete --yes

Use a custom tag name

az group bulk-delete --tag my-tag

Target a specific subscription

az group bulk-delete --subscription <sub-id>

Skip the live status dashboard

az group bulk-delete --no-status --yes

Interactively select resource groups to delete

az group bulk-delete --interactive

How it Works

  1. 1 Shows the target subscription (name + ID) and asks for confirmation
  2. 2 Lists all resource groups with the specified tag (default: delete)
  3. 3 If no tagged groups are found, falls back to interactive selection
  4. 4 Prompts for confirmation before deleting
  5. 5 Initiates deletion and shows a live status dashboard with progress
  6. 6 Ctrl+C exits cleanly at any point

Flags

Flag Description
--tag, -t Tag name used to filter resource groups. Defaults to delete.
--yes, -y Skip all confirmation prompts.
--no-status Skip the live deletion status dashboard. Just initiate deletes and exit.
--interactive, -i Interactively select resource groups to delete from a checkbox list.
--subscription Target a specific subscription by name or ID.