---
title: Data Retention
description: Control how long execution logs, deleted resources, and copilot data are kept before permanent deletion
---

import { FAQ } from '@/components/ui/faq'
import { Image } from '@/components/ui/image'

Data Retention lets organization owners and admins on Enterprise plans configure how long three categories of data are kept before they are permanently deleted. The configuration applies to every workspace in the organization.

---

## Setup

Go to **Settings → Enterprise → Data Retention** in your workspace.

<Image src="/static/enterprise/data-retention.png" alt="Data Retention settings showing three dropdowns — Log retention, Soft deletion cleanup, and Task cleanup — each set to Forever" width={900} height={500} />

You will see three independent settings, each with the same set of options: **1 day, 3 days, 7 days, 14 days, 30 days, 60 days, 90 days, 180 days, 1 year, 5 years,** or **Forever**.

Setting a period to **Forever** means that category of data is never automatically deleted.

---

## Settings

### Log retention

Controls how long **workflow execution logs** are kept.

When the retention period expires, execution log records are permanently deleted, along with any files associated with those executions stored in cloud storage.

### Soft deletion cleanup

Controls how long **soft-deleted resources** remain recoverable before permanent removal.

When you delete a workflow, folder, knowledge base, table, or file, it is initially soft-deleted and can be recovered from Recently Deleted. Once the soft deletion cleanup period expires, those resources are permanently removed and cannot be recovered.

Resources covered:

- Workflows
- Workflow folders
- Knowledge bases
- Tables
- Files
- MCP server configurations
- Agent memory

### Task cleanup

Controls how long **Mothership data** is kept, including:

- Copilot chats and run history
- Run checkpoints and async tool calls
- Inbox tasks (Sim Mailer)

Each setting is independent. You can configure a short log retention period alongside a long soft deletion cleanup period, or any combination that fits your compliance requirements.

---

## Organization-wide configuration

Retention is configured at the **organization level**. A single configuration applies to every workspace in the organization — there are no per-workspace overrides.

---

## Defaults

By default, all three settings are unconfigured — no data is automatically deleted in any category until you configure it. Setting a period to **Forever** has the same effect as leaving it unconfigured, but makes the intent explicit and allows you to change it later without saving from scratch.

---

<FAQ items={[
  {
    question: "Who can configure data retention settings?",
    answer: "Only organization owners and admins can configure data retention settings. On Sim Cloud, the organization must be on an Enterprise plan."
  },
  {
    question: "Is deletion immediate once the retention period expires?",
    answer: "No. Deletion runs on a scheduled cleanup job. Data is deleted when the job next runs after the retention period has elapsed — not at the exact moment it expires."
  },
  {
    question: "Can deleted data be recovered after the soft deletion cleanup period?",
    answer: "No. Once the soft deletion cleanup period expires and the cleanup job runs, resources are permanently deleted and cannot be recovered."
  },
  {
    question: "Does the retention period apply to all workspaces in my organization?",
    answer: "Yes. Retention is configured once per organization and applies to every workspace in the organization."
  },
  {
    question: "What happens if I shorten the retention period?",
    answer: "The next cleanup job will delete any data that is older than the new, shorter period — including data that would have been kept under the previous setting. Shortening the period is irreversible for data that falls outside the new window."
  },
  {
    question: "What is the minimum retention period?",
    answer: "1 day (24 hours)."
  },
  {
    question: "What is the maximum retention period?",
    answer: "5 years."
  }
]} />

---

## Self-hosted setup

### Environment variables

```bash
NEXT_PUBLIC_DATA_RETENTION_ENABLED=true
```

Once enabled, data retention settings are configurable through **Settings → Enterprise → Data Retention** the same way as Sim Cloud.
