Why this post exists: the Homelab series covers the supply side of compute — the machines, disks and power that individual operators actually run — and Proxmox Backup Server is the default backup layer for most Proxmox-based home labs. Its most-repeated support question is some version of "I pruned my old snapshots and the datastore is still full." The answer is not a misconfiguration, and it is not a leak; it is the documented lifecycle of a chunk. This post walks that lifecycle using the official documentation (version 4.2.14 at time of writing) as the primary source, with Proxmox staff forum replies as corroboration, and ends with the operational schedule that makes the behavior a non-issue.

What exactly does prune delete — and what does it leave behind?

The official maintenance documentation draws the line unambiguously. Verbatim: "When pruning a snapshot, only the snapshot metadata (manifest, indices, blobs, log and notes) is removed. The chunks containing the actual backup data and previously referenced by the pruned snapshot, have to be removed by a garbage collection run." That single sentence answers the entire category of confusion: prune is an index operation, not a storage operation. It edits which snapshots exist and which chunks they reference — it never touches the chunk store itself, where the deduplicated data lives. The same passage goes further and warns that this has privacy consequences: "sensitive information stored in a given data chunk will outlive pruned snapshots and remain present in the datastore as long as referenced by at least one backup snapshot. Further, even if no snapshot references a given chunk, it will remain present until removed by the garbage collection." If you ever stored a secret in a VM and want it gone from the backup server, the documented procedure is: prune every snapshot that included the data, then run GC — and for file-level backups using the metadata change-detection mode, prune all snapshots taken since the data left the input set too.

Why can't PBS just delete the chunks immediately?

Because deletion is a shared-reference problem, and the official GC Background section explains why PBS refuses to solve it eagerly. Verbatim reasoning: "Proxmox Backup Server cannot directly remove the chunks associated with it because other backups, even ones that are still running, may have references to those chunks. To avoid excessive load and slow performance, the whole datastore cannot be locked to scan all other indexes for references to the same chunks on every snapshot deletion." Deduplication means one chunk can be referenced by dozens of snapshots across different guests; checking every reference on every delete would mean locking the entire datastore and blocking new backups for the duration. So PBS inverts the problem: deletes mark, GC sweeps. The docs describe the GC as running "per datastore and ... split into two phases": Phase one (Mark) — "all index files are read, and the access time (atime) of the referenced chunk files is updated"; Phase two (Sweep) — the task checks every chunk's atime against a cutoff, "given by either the oldest backup writer instance, if present, or 24 hours and 5 minutes before the start of the garbage collection." Chunks older than the cutoff are considered unreferenced by any snapshot index and not part of any running backup, and are deleted.

Why the 24h5m grace period, and why two runs?

Both numbers follow from the same design, and the documentation derives them rather than asserting them. The grace period is not arbitrary — the docs note it "stems from the fact that filesystems are typically mounted with the relatime option by default. This results in better performance by only updating the atime property if a file has been modified since the last access or the last access has been at least 24 hours ago." Since Mark's atime updates only stick when more than 24 hours have passed since the previous access, a cutoff shorter than 24 hours could delete chunks that Mark had just refreshed — so the cutoff is set to 24 hours plus a 5-minute safety margin. The two-run requirement falls out of the sequencing: a chunk that became unreferenced before this GC's Mark phase was never touched by Mark, so its atime still shows its last real backup-time access — which is older than the cutoff, so Sweep deletes it this run. But a chunk that became unreferenced during or after this run has no fresh atime yet; the docs state the consequence verbatim: "The no longer referenced chunks will then be marked for deletion on the next garbage collection run and removed by a subsequent run after the grace period." One run marks, the next run removes — two complete GC runs are the structural minimum between "pruned" and "space freed." Chunks inside the grace period are not silently skipped, either: they are "logged at the end of the garbage collection task as Pending removals," which is the line to read in the task log when you want to know whether the next run will actually reclaim anything.

What should a homelab operator actually do?

Three things, all cheap. First, scheduled GC is not optional — the docs recommend it directly: "It's recommended to setup a schedule to ensure that unused space is cleaned up periodically. For most setups a weekly schedule provides a good interval to start." In the GUI this is Datastore → Options → GC Schedule; a Sunday-night weekly run is the common homelab pattern. Second, reset your expectations for the usage graph: after a prune, the space returns on a delay of roughly one to two GC cycles — with a weekly schedule, up to about two weeks. That lag is the designed behavior of a lock-free, deduplicating chunk store, not a failure to investigate. Third, read the GC task log's Pending removals line: if it is large after a run you expected to free space, the mechanics are working and the answer is simply "next run"; if it is near zero and usage still has not moved, then and only then do you have something worth debugging (commonly: a forgotten keep-* retention policy, or snapshots on a second datastore). Proxmox staff replies on the official forum have repeatedly confirmed the same rule — that neither prune nor forget free chunk-store space — which matches the documentation word for word and gives us the two-source corroboration this forum requires.

Three adjacent gotchas in the same documentation

While we were in the maintenance pages, three neighbors of the prune/GC behavior are worth pinning. (1) Verification of encrypted chunks is structurally limited: because client-side encryption happens before chunking, the server sees only opaque ciphertext and can verify that a chunk's digest matches — but cannot re-compress or deeply validate the plaintext, so verify runs tell you the encrypted bytes are intact, not that the original data would decompress cleanly. (2) The chunk store's integrity rests on SHA-256 and the odds are not worth worrying about: the official technical overview quotes a collision probability of 3.1115 × 10⁻⁶¹ for finding a colliding pair among all chunks in a full datastore — as the docs put it, "this is much less probable than the probability of getting hit by a meteorite," a comparison this forum has no quarrel with. (3) The change-detection-mode metadata caveat quoted above cuts both ways: file-level backups in that mode can reference chunks containing files that no longer exist in any current snapshot, which is exactly why the sensitive-data removal procedure has the extra "prune everything since" step.

The testable summary

One sentence to remember, and one to verify on your own box. To remember: in Proxmox Backup Server, prune edits the index, GC reclaims the store, and the grace period guarantees a minimum of two complete GC runs between the two — the 24h5m cutoff exists because relatime only rewrites atime after a day. To verify, this week: prune something you do not need, note the datastore usage, run GC manually, read the Pending removals figure in the task log, run GC again after 24 hours and 5 minutes have passed, and watch the usage drop on the second run. If your box does anything else, that is the bug report worth filing — because on the documentation's own terms, two runs is not a workaround. It is the mechanism.