Skip to content

Data Retention

pxdiff stores screenshots, diffs, and baselines in cloud storage (S3). This page explains how long data is retained and when it’s automatically cleaned up.

Captures and diffs are retained as long as their branch is active. Cleanup happens in two scenarios:

When a branch is deleted in GitHub (and the GitHub App is installed), pxdiff schedules cleanup 14 days after the branch is deleted. This grace period protects against accidental deletion — if the branch is recreated, the scheduled cleanup is cancelled.

After 14 days, pxdiff deletes all captures, diffs, and shared baselines for that branch from both the database and cloud storage.

A daily scan detects branches with no new captures in 30 days. Inactive branches are cleaned up immediately — captures, diffs, and local (per-user) baselines are removed.

Protected branches (main, master, and your repository’s default branch) are never cleaned up by the inactivity scan.

Baseline retention depends on how cleanup was triggered:

ScenarioShared baselinesLocal baselines
Branch deleted via GitHubDeleted after 14 daysUnaffected
Branch inactive for 30 daysPreservedDeleted

Shared baselines on inactive branches are preserved because the branch may still exist — the inactivity scan only checks pxdiff activity, not Git. If you’ve stopped running visual tests on a branch but haven’t deleted it, baselines remain available in case you resume.

Local baselines (per-user, from pxdiff local workflows) are treated as ephemeral and cleaned up after inactivity.

Hosted site builds (from pxdiff storybook or pxdiff ladle cloud captures) are stored temporarily and expire after 7 days. These are used during capture and review, not as permanent hosting.

Deleting a project immediately removes all associated data from the database: captures, diffs, baselines, suites, API keys, and site records. Cloud storage objects (screenshots, diff images) are cleaned up asynchronously.

Deleting an organization cascades to all projects within it. The same cleanup behavior as project deletion applies to each project.

DataRetentionCleanup trigger
Captures & diffsUntil branch deleted or 30 days inactiveAutomatic
Shared baselinesUntil branch deleted in GitHubBranch deletion cleanup
Local baselinesUntil 30 days inactiveInactivity scan
Hosted site builds7 daysAutomatic expiry
Project dataUntil project deletedManual deletion