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

# Archive & auto-delete

> How Ona archives and deletes inactive environments.

Ona manages inactive environments in two stages: archival after a period of inactivity, then auto-deletion based on your plan and organization policy.

## Timelines

| Plan       | Archive after                                  | Auto-delete after archival         |
| ---------- | ---------------------------------------------- | ---------------------------------- |
| Core       | 3 days                                         | 4 days                             |
| Enterprise | 3 days by default; configurable from 1-30 days | Configurable (1-4 weeks, or never) |

<img src="https://mintcdn.com/gitpod-13c83c2b/8kL6ymKoAokgvc4L/images/docs/ona/environments/lifecycle.svg?fit=max&auto=format&n=8kL6ymKoAokgvc4L&q=85&s=1f35cf9ebe9e64cb8d500423ace6c380" alt="Environment lifecycle" width="720" height="200" data-path="images/docs/ona/environments/lifecycle.svg" />

## Archiving

Stopped environments are archived after the inactive period for your plan. Enterprise organization policies can replace the default archive timing. Archived environments move to a separate view and can be unarchived or deleted. You receive an email when environments are archived.

## Viewing archived environments

Select **Archived** from the sidebar toggle to view archived environments. Switch back to **Project** or **Recently active** to return to the main view.

## Managing archived environments

Hover over an archived environment to reveal actions:

* **Unarchive** - click the restore icon. The environment returns to your main list.
* **Delete** - click the trash icon and confirm in the dialog.

<Warning>Deleting an environment permanently removes all content. This cannot be undone.</Warning>

### Delete all

<img src="https://mintcdn.com/gitpod-13c83c2b/8kL6ymKoAokgvc4L/images/docs/ona/environments/archive-delete-all.png?fit=max&auto=format&n=8kL6ymKoAokgvc4L&q=85&s=92579d70563ff2e03d251f83d3b3d112" alt="Delete All confirmation dialog" width="1114" height="608" data-path="images/docs/ona/environments/archive-delete-all.png" />

Click **Delete All** at the bottom and confirm to remove all archived environments.

## Archive timing settings

Enterprise admins can configure when stopped environments move to Archived from **Settings > Organization > Policies**. The minimum is 1 day and the maximum is 30 days. Core organizations archive stopped environments after 3 days. See [Archive timing policy](/ona/organizations/policies/archive-timing) for details.

## Auto-delete settings

<img src="https://mintcdn.com/gitpod-13c83c2b/8kL6ymKoAokgvc4L/images/docs/ona/environments/archive-auto-delete-settings.png?fit=max&auto=format&n=8kL6ymKoAokgvc4L&q=85&s=f914694b4fcd151668c90eb8680c0cfa" alt="Auto-delete dropdown showing 1 week, 2 weeks, 4 weeks, and Never options" width="970" height="1048" data-path="images/docs/ona/environments/archive-auto-delete-settings.png" />

Options: **After 1 day**, **After 2 days**, **After 3 days**, **After 5 days**, **After 1 week**, **After 2 weeks**, **After 4 weeks**, or **Never**.

<Note>Auto-delete preferences are available on Enterprise plans. Core organizations auto-delete environments 4 days after archival.</Note>

Organization policies override user preferences when more restrictive. Disabled options in the dropdown indicate policy restrictions.

## FAQ

<Accordion title="When are environments archived?">
  Core environments archive after 3 days of inactivity. Enterprise environments archive after 3 days by default, or after the organization policy period.
</Accordion>

<Accordion title="Can I recover deleted environments?">
  No. Only archived environments can be restored.
</Accordion>

<Accordion title="Why are some auto-delete options disabled?">
  Your organization policy enforces a maximum retention period.
</Accordion>

<Accordion title="Do running environments get archived?">
  No, only stopped environments.
</Accordion>

<Accordion title="Can't change auto-delete preference?">
  Check organization policy restrictions.
</Accordion>
