Current

Storage Garbage Collection

How Doxa removes unused published versions, previews, and rendered pages from storage

Storage Garbage Collection

Doxa writes derived files to storage for every published version, branch preview, cache entry, and pre-rendered page. When one of these stops serving production, Doxa removes its files in the background. You do not need to clean up storage yourself.

What gets removed

Doxa runs one scheduled cleanup process for all of these kinds of content. Each kind has its own rules for when its files can be deleted.

ContentRemoved whenKept while
Published version folderNo longer referenced by any version, publication, or site headA site head, publication, or version baseline still points to it
Branch previewThe branch is replaced or erasedA preview channel or branch base still points to it
Pre-rendered pageThe published version changes, the hostname stops serving the site, or the renderer release changesThe current render still matches the active site
Orphaned version folderA publish or preview build started but never created a version recordA version record uses the folder

Cleanup never deletes shared content blobs directly. A blob can belong to several versions of the same site, so Doxa only removes the folder that lists it. Blob cleanup runs afterward for that site.

Published versions and publication history

A version folder stays in storage while anything still refers to it. This includes:

  • The version that is live on your site.

  • Any publication in your publication history. Restoring one of these publications uses the stored version, so Doxa keeps it.

  • A rollback or promotion that points to the same folder.

When you publish a newer version, the previous one stops serving production. It is removed only after nothing refers to it. See Branches, Previews, Publishing, and Restore and Publish and history for how to review and restore publications.

Branch previews

Previews are built from a branch and are kept separate from published versions. Their cleanup timing depends on what happened to the preview:

  • Replaced preview: Doxa keeps the old preview for one hour. This lets pages that started rendering before the change finish.

  • Erased branch: Doxa removes the preview files right away after you erase the branch, publish with erase, or discard a hidden branch.

Note:

Preview hostnames stop resolving as soon as their preview record is removed. Preview and production versions are numbered separately, so a preview never takes a published version number.

Cached copies and rendered pages

Doxa keeps pre-rendered HTML for public production sites. When a site is republished, the old pre-rendered pages are removed and replaced by new ones. Readers are served the current output only.

Copies held in the docs runtime cache can outlive a deletion for a short time:

  • Folder listings: up to one day.

  • Content blobs: up to one year.

Readers cannot reach these copies through a version that no longer serves your site. A reader only requests the folder of a version that is currently serving.

What to expect

  • Cleanup runs automatically. You do not configure it in the dashboard or through the API.

  • Deleted versions and previews cannot be restored. Restore a published version only while it is still in your publication history.

  • Files written for a generation that never became a version are removed after a waiting period of 24 hours.