Tools & Add-onsPVE Tools
PVE Guest Deletion
Select LXC containers and VMs from one list and destroy them, stopping running guests first.
guest-delete.sh deletes several guests in one go. It lists all containers and VMs of the node, lets you tick the ones to remove and destroys them including their disks.
Website entry: guest-delete. Source: tools/pve/guest-delete.sh.
Run
In the Proxmox VE host shell, as root:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/guest-delete.sh)"Prompts
| Prompt | Choices | Effect |
|---|---|---|
| "This will delete LXC containers and/or VMs. Proceed?" | Yes / No | No ends the script. |
| "Select LXC containers and VMs to delete:" (checklist with type, name and status) | Individual guests, ALL-CT ("Delete ALL containers"), ALL-VM ("Delete ALL VMs") | Nothing selected or Cancel shows "No guests selected!" and exits. |
Delete guests manually or automatically? (Default: manual) m/a: | m or Enter | Asks before each guest. |
a | Deletes every selected guest without further questions. | |
Delete container <id>? (y/N): or Delete VM <id>? (y/N): (manual mode) | y | Deletes that guest. Anything else skips it and leaves it running. |
If the node has neither containers nor VMs the script shows "No LXC containers or VMs available!" and exits with 234.
What it does
For each confirmed guest:
- If it is running, it is stopped with
pct stoporqm stop. - It is destroyed:
| Guest | Command |
|---|---|
| Container | pct destroy <id> -f |
| VM | qm destroy <id> --purge --destroy-unreferenced-disks |
If a destroy fails, a box shows the last five lines of the command's output and the script continues with the next guest.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
COMMUNITY_SCRIPTS_CORE_URL | https://raw.githubusercontent.com/community-scripts/core/main | Base URL the script loads api/api.func from. |
Limits
- There is no undo. Disks are removed with the guest.
- Running guests are stopped hard, not shut down.
- In automatic mode with
ALL-CTorALL-VMticked, every container or VM on the node is destroyed after a single keypress. - Only guests of the node you run the script on are listed.