You spun up a test VM three weeks ago, forgot about it, and now it's just sitting there eating disk space on your Proxmox node. Or maybe a client project ended and you need to clean house before someone asks why the server is 80% full. Either way, deleting a VM in Proxmox VE is one of those tasks that looks trivial until you accidentally nuke a disk you actually needed.

The good news: it's a two-minute job once you know what the checkboxes actually do. The bad news: Proxmox doesn't ask twice, and there's no recycle bin. Once a VM is destroyed, its disks are gone unless you had a backup.

This guide walks through deleting a VM the safe way, both from the web interface and from the command line, and explains exactly what each option removes so you're not guessing.

What You Will Learn

  • What actually happens on disk when you delete a VM
  • How to remove a VM from the Proxmox web GUI, step by step
  • How to delete a VM from the command line with qm destroy
  • What the Purge and Destroy Unreferenced Disks options really do
  • How to back up a VM first, in case you change your mind later
  • Common errors you'll hit when a VM won't delete, and how to fix them

What Is VM Deletion in Proxmox VE?

When you delete, or "destroy" in Proxmox's own terminology, a virtual machine, you're removing three things at once: the VM's configuration file, its virtual disk images, and any references to it in Proxmox's internal databases (things like backup schedules, replication jobs, and firewall rules tied to that VM ID).

The configuration file lives at /etc/pve/qemu-server/<vmid>.conf on the node where the VM is registered. It's a plain text file, maybe 20 lines long, describing CPU count, RAM, disk locations, and network setup. Deleting the VM removes this file along with the disks it points to.

The disks themselves depend on your storage type. On LVM-Thin or ZFS storage, a disk is a logical volume or dataset, and destroying it frees the space immediately. On directory storage (like a plain folder on your local disk), the disk is a .qcow2 or .raw file that gets deleted from the filesystem. Either way, once it's gone, it's gone.

Why Would You Delete a VM?

Most of the time it's simple housekeeping. Test environments pile up fast in a homelab — you spin up an Ubuntu box to try something, it works, and six months later you've got four abandoned VMs quietly holding onto 200 GB combined.

There are a few recurring reasons people end up here:

  • A test or staging VM has served its purpose and is no longer needed
  • You're rebuilding a VM from scratch instead of fixing a broken install
  • Storage is running low and old VMs are the easiest thing to reclaim
  • A VM ID conflict is blocking a restore or clone, and the old VM needs to go first

Whatever the reason, the mechanics are the same. What changes is how careful you need to be about backups first.

Prerequisites

Before you touch anything, make sure of the following:

  • You have access to the Proxmox VE web interface (usually https://your-server-ip:8006) or SSH access to the node
  • You know the VM's ID number, shown in the left-hand resource tree next to its name
  • You've double-checked this is actually the VM you mean to delete — VM IDs and names can look similar if you've got a lot of them
  • If there's any chance you'll want the data back later, you've taken a backup (covered below)

That last point matters more than people expect. Proxmox's confirmation dialog is good, but it only protects you from typos, not from deleting the wrong VM entirely.

Step-by-Step Tutorial

Step 1: Back Up First (Optional, But Do It Anyway)

If there's even a small chance you'll regret this later, take a quick backup before deleting anything. In the Proxmox web interface, click the VM, go to the Backup tab, and click Backup Now. Choose your backup storage and compression (zstd is a good default — fast and decent compression). This takes a few minutes depending on disk size, and gives you a way back if you change your mind next week.

Step 2: Shut Down the VM

Proxmox won't let you delete a running VM. Click the VM in the resource tree, then click Shutdown in the top-right corner. This sends an ACPI shutdown signal, the same as pressing the power button on a real machine, so the guest OS shuts down cleanly.

If the VM is unresponsive and won't shut down normally, use Stop instead. This is the equivalent of pulling the power cord — it works, but skip it if you still care about anything on the disk, since it doesn't give the OS a chance to flush writes.

Step 3: Open the Remove Dialog

With the VM stopped, click the More button in the top-right corner of the VM's panel, then select Remove from the dropdown. A confirmation window pops up.

Step 4: Understand the Two Checkboxes

This is the part people skip past without reading, and it's the part that actually matters:

OptionWhat it doesWhen to check it
Purge from job configurationsRemoves this VM ID from backup schedules, replication jobs, and HA rulesAlmost always — leaves no orphaned references behind
Destroy unreferenced disks owned by guestDeletes any disk images tagged with this VM ID that aren't currently attached in its configCheck it if you want a full cleanup; leave it unchecked if you detached a disk on purpose to keep it

Leaving Purge unchecked isn't dangerous, it just leaves stale entries in your backup job list pointing at a VM ID that no longer exists. Mildly annoying, not harmful. The disk checkbox is the one to actually think about — if you detached a disk earlier because you wanted to keep it, don't check this box, or it'll get swept up anyway.

Step 5: Type the VM ID to Confirm

Proxmox asks you to type the numeric VM ID into a text field before the Remove button becomes clickable. This is the main safeguard against fat-fingering the wrong VM. Type it carefully, then click Remove.

The VM disappears from the resource tree within a few seconds for small disks, or up to a minute or two for large ones on spinning disks.

Step 6 (Optional): Delete From the Command Line Instead

If you're managing Proxmox over SSH, or scripting cleanup for several VMs at once, use qm destroy:

qm destroy 105

This destroys VM 105 and everything referenced in its config. To also purge it from backup, replication, and HA job configs and remove any orphaned disks, add both flags:

qm destroy 105 --purge --destroy-unreferenced-disks 1

Run qm status 105 first if you're not sure whether the VM is stopped — qm destroy will refuse to run against a VM that's currently powered on.

Commands Explained

  • qm destroy <vmid> — permanently removes the VM's config file and its disks. There's no undo.
  • --purge — also strips the VM ID out of backup jobs, replication jobs, and HA resource rules, so nothing references a VM that no longer exists.
  • --destroy-unreferenced-disks 1 — scans storage for any disk images tagged with this VM ID that aren't listed in the current config, and deletes those too. Useful after you've detached disks over time and forgotten about them.
  • qm status <vmid> — shows whether the VM is running, stopped, or suspended. Check this before destroying anything.
  • qm stop <vmid> — force-stops a VM immediately, like pulling the power cord. Use qm shutdown <vmid> instead when you want a clean OS shutdown.

Common Errors

VM is running, Proxmox refuses to delete it

You tried to delete a VM that's still powered on. Shut it down (GUI: Shutdown button, CLI: qm shutdown <vmid>) and try again.

Remove button stays disabled after typing the VM ID

You typed the wrong number, or left the confirmation field blank. Re-check the VM ID shown in the resource tree and type it exactly, including leading digits.

Error: volume is in use, cannot remove

Something else still has this disk locked — usually a backup job running against it, or a stuck lock file. Wait for any active backup or migration task to finish, then retry. If the lock persists with nothing actually running, you may need qm unlock <vmid> before deleting.

Disk space doesn't shrink after deleting a ZFS-backed VM

ZFS sometimes takes a moment to reclaim space, especially with snapshots involved — an old snapshot can keep holding blocks even after the VM itself is gone. Run zfs list -t snapshot to check for leftover snapshots tied to that VM's dataset and remove them if you don't need them.

Troubleshooting

If the Remove button stays greyed out even after typing the VM ID correctly, refresh the browser tab. Proxmox's web UI occasionally gets into a stale state after a long session, and a hard refresh clears it.

If deletion via the GUI silently does nothing, switch to SSH and run qm destroy <vmid> --purge directly. The CLI output will tell you exactly what's blocking it, which is more useful than the GUI's generic error banner.

For a VM stuck in a locked state (you'll see something like lock: backup when you run qm config <vmid>), check that no backup or migration task is actually still in progress under Datacenter > Tasks before forcing an unlock. Removing a lock while a task is genuinely still running can corrupt the disk.

Best Practices

Take a backup before deleting anything you're not 100% sure about. It costs a few minutes and a bit of storage; forgetting a config change on a VM you thought was disposable costs a lot more.

Get in the habit of checking Purge from job configurations every time. It's a no-downside cleanup step that keeps your backup and replication job lists honest.

Be more careful with Destroy unreferenced disks. If you've ever detached a disk from a VM on purpose — say, to attach it to a different VM later — leaving that box unchecked is what saves it.

If you're cleaning up several old VMs at once, list them first with qm list so you have their IDs and names side by side before deleting anything. It's a lot harder to mix up VM 112 and VM 121 when you can see both names next to the numbers.

Frequently Asked Questions

Can I recover a VM after deleting it?

Not through Proxmox itself — there's no undo or recycle bin. Your only way back is a prior backup on a Proxmox Backup Server, an NFS share, or another backup storage target.

Does deleting a VM also delete its backups?

No. Backups stored in a backup storage location (like Proxmox Backup Server or a directory storage with backup content enabled) are independent of the VM and stay put after you delete the VM itself.

What's the difference between Stop and Shutdown before deleting?

Shutdown asks the guest OS to power off cleanly. Stop cuts power immediately, like a hardware kill switch. Either works before deletion since you're removing the disk anyway, but Shutdown is safer if you're at all unsure and want to double-check something inside the VM first.

Can I delete a VM that's part of a cluster or has HA enabled?

Yes, but check the Purge box so its HA resource entry gets cleaned up automatically. Skipping this leaves a dangling HA rule pointing at a VM ID that no longer exists.

Why does deletion take longer on some VMs than others?

Disk size and storage type are the main factors. A 20 GB disk on local directory storage deletes almost instantly. A 2 TB disk on spinning-disk ZFS can take noticeably longer since the underlying blocks have to actually be freed.

Conclusion

Deleting a VM in Proxmox VE is quick once you know what the two checkboxes actually control, and the confirmation-by-VMID step means an accidental click alone won't wipe the wrong machine. The real risk isn't the delete button — it's not having a backup for the one VM you didn't expect to need again. Take the thirty seconds to back up anything you're unsure about, and cleanup becomes a genuinely low-risk five-minute task.