To clear storage in Proxmox, delete unused virtual machines, templates, disk images, and old backups, then run the 'pvesm prune' command to reclaim space. Many users assume deleting a VM removes all associated data, but disk snapshots and backup files often remain and continue to consume space.

What Takes Up Space in Proxmox?

Proxmox Virtual Environment (Proxmox VE) uses storage for virtual machines (VMs), containers (LXC), disk images, ISO files, backups, and snapshots. Each VM or container has at least one disk image, typically stored in qcow2 or raw format. These images grow with use and can occupy gigabytes per instance. Snapshots preserve VM states and can accumulate silently, consuming significant space over time.

Backups are another major storage consumer. Proxmox supports full and incremental backups, often stored in the local backup storage or external NFS/CIFS mounts. A single weekly backup over several months can use hundreds of gigabytes, especially for large VMs. ISO files, though smaller individually, add up when many are uploaded for OS installations.

How Much Space Can Be Freed?

Deleting a single unused VM can free between 10 GB and 200 GB, depending on disk size and usage. A full backup of a typical server VM ranges from 15 GB to 50 GB. Snapshots vary: a single snapshot may add 1 GB to 20 GB, but chained snapshots grow cumulatively. Removing ten old backups might reclaim 300 GB to 800 GB. Unused ISO files typically consume 1 GB to 5 GB each, with common distributions like Ubuntu or CentOS using about 2 GB per ISO.

Storage cleanup often recovers 20% to 60% of used space on overfilled systems, especially those with unmanaged backups. Systems with thin-provisioned disks may show full logical use but have recoverable space after deletion. Thick-provisioned disks release space only after full cleanup and pruning.

How to Delete Virtual Machines and Templates Safely

  1. Log in to the Proxmox web interface and navigate to the node or VM you want to remove.
  2. Ensure the VM or container is powered off. If it is running, shut it down gracefully from the console.
  3. Select the VM in the left panel, then click Remove at the top of the summary tab.
  4. Confirm deletion. This removes the VM configuration and associated disk images from the storage listed in the VM’s hardware tab.

For templates, go to the storage view (Datacenter > Storage), select the template, and click Delete. Templates are read-only disk images used to clone new VMs. Deleting them only removes the base image, not any VMs created from them.

Before deletion, verify no other VMs depend on the template or disk. Accidentally removing a template used by active VMs does not break those VMs but prevents creating new clones until another template is available.

How to Remove Snapshots and Backups

Snapshots preserve VM disk and memory states. To delete them, go to the VM, click the Snapshots tab, select the snapshot, and click Delete. Removing the oldest snapshot first allows Proxmox to collapse incremental changes and free space faster. If a VM has a long snapshot chain, delete them one by one, starting from the earliest.

For backups, navigate to Datacenter > Storage > backup. Select outdated backups by date and name, then click Delete. Backups are named with timestamps (e.g., vzdump-qemu-100-2023_12_01-02_00_00.vma.zst). Confirm each deletion. Deleting backups older than 90 days is a common policy to balance recovery options and space use.

After deletion, space may not appear free immediately. This is because Proxmox storage backends like LVM, ZFS, or directory-based storage require manual pruning to reclaim space.

How Long Does Proxmox Keep Unused Data?

Proxmox does not automatically remove VMs, templates, snapshots, or backups. These files persist until manually deleted. Snapshots remain until explicitly removed, even if the VM is deleted. Orphaned disk images—those not linked to any VM—can linger in storage if not cleaned up.

Backup retention depends entirely on your backup schedule and cleanup settings. When creating a backup job, you can set Max Backups to a number like 4 or 8. If enabled, Proxmox automatically removes the oldest backup when the limit is reached. Without this setting, backups accumulate indefinitely.

To enforce automatic cleanup, edit the backup job in Datacenter > Backup > Edit. Set Max Backups to a realistic number based on your recovery needs—typically 3 to 8 for weekly jobs. This prevents uncontrolled growth.

How to Reclaim Space After Deletion

After deleting files, run pvesm prune from the command line to reclaim space. This command scans storage and removes unreferenced chunks, especially important for lvm-thin and zfs storage types.

Open a shell on the Proxmox host via SSH or the web terminal. Run:

pvesm prune <storage-id>

Replace <storage-id> with your storage name, such as local or local-lvm. For example:

pvesm prune local-lvm

The process may take minutes to hours depending on storage size and fragmentation. Monitor progress via the command output or Proxmox logs. Once complete, check available space in the web interface under Datacenter > Storage.

For directory-based storage (e.g., dir type), pvesm prune removes orphaned files and optimizes space. For Ceph or NFS, pruning behavior depends on backend support; consult your storage documentation.

What Goes Wrong When Clearing Proxmox Storage

A common mistake is deleting a VM without checking its snapshots. If snapshots exist, the disk image may not be fully removed. The VM disappears from the list, but the snapshot files remain in storage, still consuming space. Always check the Snapshots tab before deletion.

Another issue is pruning the wrong storage. Running pvesm prune on a storage not using thin provisioning (like plain directory storage) has limited effect. It works best on lvm-thin and zfs. On other types, space is freed immediately after file deletion, without needing pruning.

Deleting a backup file directly via command line (e.g., rm) instead of through the Proxmox interface can leave metadata inconsistencies. Always delete backups from the web interface or via qm delbackup or pct delbackup commands to maintain catalog integrity.

How to Check Storage Use

In the Proxmox web interface, go to Datacenter > Storage to see a list of all storage mounts, their total size, used space, and free space. Click on a storage entry to view its content: ISOs, backups, container templates, and disk images.

From the command line, use:

df -h

This shows filesystem-level usage. For Proxmox-specific details, run:

pvesm status

This lists all defined storages with usage percentages. To inspect a specific storage:

pvesm list <storage-id>

This displays all files in that storage, including their size and date. Use this to identify large, outdated files manually.

Can You Resize or Add Storage Instead?

Yes. If clearing space is not enough, consider resizing the underlying storage. For LVM, extend the volume group with a new disk, then grow the logical volume. For ZFS, add a new vdev or expand the existing disk if using thin provisioning.

Alternatively, add a new storage mount. Attach an external drive or network share (NFS/CIFS), register it in Proxmox under Datacenter > Storage > Add, and use it for future backups or VMs. This spreads load and prevents overfilling the system disk.

However, adding storage does not fix the root cause of unmanaged files. Combine expansion with a regular cleanup schedule to maintain control.