> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/datasets/dataset-lifecycle-and-recovery.md).

# Archive and restore datasets

Archive, restore, trash or recover a dataset, and fix a project that has the wrong data attached.

Datasets have three states, shown as tabs on the **Datasets** page: **Active**, **Archived** and **Trash**. Archiving or deleting a dataset never deletes the files in Data Space.

## Archive or delete a dataset

Open a dataset's row menu:

| State        | Available actions                                                       |
| ------------ | ----------------------------------------------------------------------- |
| **Active**   | Rename, add files, attach to a project, **Archive**, **Move to Trash**. |
| **Archived** | **Restore** to Active, or **Move to Trash**.                            |
| **Trash**    | **Restore**, or **Delete forever**.                                     |

A dataset that is attached to projects can't go to Trash yet. The dialog lists those projects; [detach it](https://docs.unitlab.ai/documentation/datasets/attach-datasets-to-projects.md#detach-a-source) from each one first.

{% hint style="warning" %}
**Delete forever** cannot be undone. It deletes the dataset and its versions, not the underlying files.
{% endhint %}

## Go back to an earlier version

1. Open the dataset and select **View all versions**.
2. Use **View version** to check the version you need.
3. Choose one:
   * **Restore to working draft**, then **Publish version** to make it the newest version again.
   * **Duplicate as new dataset** to keep it separate.

See [Dataset versions and history](https://docs.unitlab.ai/documentation/datasets/dataset-versions-and-history.md).

<figure><img src="https://292810646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGjVLUz4wthGkGlRKM6rM%2Fuploads%2FTRNFtkCvwy75DrlIjZPe%2Fdataset-history.webp?alt=media" alt="Dataset history dialog listing v2 and v1 with View version and Duplicate as new dataset" width="600"><figcaption></figcaption></figure>

## Fix a project with the wrong data

1. In the project, open **Datasets** and check the version on each source card.
2. Open the card menu and select **Detach**. Keep the labels (the default) unless you are sure.
3. Attach the correct version with **Attach Data**.

If you later attach the detached source again, its files and labels return.

## Project uploads and versions

Files uploaded directly into a project go to the project's own dataset, named after the project. After each upload batch finishes, Unitlab publishes a new version of it automatically. Uploads into a Data Space folder are not published automatically; you publish them yourself.

## Related

[Datasets overview](https://docs.unitlab.ai/documentation/datasets/datasets-overview.md) · [Attach datasets to projects](https://docs.unitlab.ai/documentation/datasets/attach-datasets-to-projects.md) · [Folders](https://docs.unitlab.ai/documentation/data/data-folders.md)
