> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zespan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data retention and deletion

> How long Zespan keeps your trace and event data on each plan, what happens after a downgrade, and what deleting a project or an organization removes and when.

## Retention by plan

Your plan sets how long Zespan keeps your trace and event data. Data older than the plan's retention window is no longer shown anywhere in the dashboard or API, and a daily cleanup permanently deletes it.

| Plan | Retention |
| - | - |
| Free | 14 days |
| Solo | 30 days |
| Pro | 90 days |
| Team | 180 days |
| Scale | 365 days |

Retention isn't configurable per project. The **Data retention** field under project **Settings → General** shows your plan's retention and is read-only; upgrade your plan to extend it. See [Billing](https://docs.zespan.com/account/billing.md).

### If you downgrade

A downgrade never deletes data immediately. For **30 days** after a plan change, the longer of the old and new plan's retention applies. After that, the new plan's retention applies and older data is deleted.

## Deleting a project

Deleting a project takes effect immediately: the project disappears from the dashboard and its API keys stop working — SDK and OpenTelemetry ingest for it are refused straight away.

The project's data is then permanently removed after a grace period of **7 days**. The removal covers traces, events, evaluations, scores, guardrail events, costs, and stored evidence packs and audit exports for that project. The dashboard has no way to restore a deleted project.

## Deleting an organization

Only an owner can delete an organization. The organization, its projects, members, and invitations are removed right away, and every project's API keys stop working at once. The organization's trace and event data is purged shortly afterwards — usually within about an hour — and checked again after 24 hours to catch events that were still being processed. Organization deletion doesn't use the project grace period.

> [!WARNING]
>
> Deleting a project or an organization can't be undone once the data has been purged. Export anything you need first.

Deleted data can remain in backups until those backups expire on their regular schedule.

## Erasing one person's data

To delete the data of a single end user of your application rather than a whole project, see [End-user data requests](https://docs.zespan.com/platform/end-user-data.md). To delete your own Zespan account, see [Privacy](https://docs.zespan.com/account/privacy.md).

## Self-hosted deployments

On a self-hosted deployment the operator can change the defaults above:

| Variable | Default | Effect |
| - | - | - |
| `TENANT_PURGE_GRACE_DAYS` | `7` | Days between deleting a project and purging its data. Whole number from 1 to 365; anything else falls back to 7. Doesn't apply to organization deletion. |
| `RETENTION_DOWNGRADE_GRACE_DAYS` | `30` | Days after a plan change during which the longer retention applies. Whole number from 0 to 365; `0` turns the grace off; anything else falls back to 30. |

See [Environment variables](https://docs.zespan.com/platform/environment-variables.md).

## Next steps

* [Billing](https://docs.zespan.com/account/billing.md) — plans, retention, and downgrades
* [Organizations](https://docs.zespan.com/account/organizations.md) — who can delete an organization
* [End-user data requests](https://docs.zespan.com/platform/end-user-data.md) — erase or export one end user
* [Security](https://docs.zespan.com/platform/security.md) — how Zespan protects your data


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.