# Trash

> Restore deleted entries, compositions, patterns, and assets during the project's retention period before they are permanently deleted.

Source: https://docs.uniform.app/docs/guides/content-organization/trash

When you delete an entry, composition, pattern, or asset, Uniform moves it to **Trash** instead of removing it immediately. You can restore it from there until the retention period ends.

Trash is a safety net for accidental deletes. It isn't a version history and it isn't a long-term archive — content history still tracks earlier versions of the items you haven't deleted.

## What goes to Trash

Trash is available for:

- Entries
- Compositions
- Entry patterns
- Component patterns
- Composition patterns
- Assets
- Editions of entries and compositions

Deleting a project, component definition, workflow, redirect, or other setting is permanent.

## Find Trash

Every listing that supports Trash has its own Trash page in the sidebar, below **My recents** and **Favorites**.

![The entries sidebar with Trash selected.](https://docs.uniform.app/images/guides/composition/trash/entries-trash-sidebar.png)

Each page shows only the deleted items of that type. Trashed items don't appear in the normal listing, in search results, or in **My recents**.

## Delete an item

Deleting asks you to confirm, then moves the item out of the listing and into Trash.

![Confirmation dialog shown before an item is moved to Trash.](https://docs.uniform.app/images/guides/composition/trash/delete-confirmation.png)

> **Unpublish instead of delete:**
>
> Unpublish if you only need to take something off the site and keep working on it. Delete when you intend to remove it and might want it back later.

### Published items

If the item was published:

- The published version is removed immediately and can't be restored.
- The draft moves to Trash.
- Restoring brings the item back as a **draft**. Publish it again if it should be live.

Assets have no draft and published split, so restoring an asset returns the same asset record.

### Releases

With a release selected:

- Deleting an item that already exists on Base schedules the delete for launch. It is **not** moved to Trash at delete time. When the release launches, the Base item moves to Trash.
- Deleting an item that exists only on the release moves it to that release's Trash. You can restore it while you're viewing that release. After launch, release-only deleted items are gone.

A locked release blocks restoring the same way it blocks other edits.

## Restore an item

### From the Trash list

Restore is available on every row. The list is paginated and sorted by most recently deleted.

![Trash list of deleted entries showing name, type, slug, and when each was deleted.](https://docs.uniform.app/images/guides/composition/trash/entries-trash-list.png)

### From the editor

Opening a trashed item shows it read-only, with restore in the header. It stays read-only until you restore it.

![Editor header for a trashed item, showing its deleted and read-only state.](https://docs.uniform.app/images/guides/composition/trash/trashed-entry-editor.png)

### After restore

- The item returns to its listing and is editable again.
- Webhooks and search re-indexing run as they would for any other update.
- Trashed items don't count toward plan usage, so a restore can fail if the project is already at its plan limit.

### Slugs

If another active entry or composition already uses the same slug, the restore is blocked. Change or remove the conflicting slug, then restore again.

### Restore a composition

Trashing a composition disconnects it from its project map node, and restoring doesn't reattach it. Uniform reminds you of this before restoring, so you can [reattach the node](https://docs.uniform.app/docs/guides/project-maps#attach-a-composition-to-a-node) manually afterwards.

![Dialog shown when restoring a composition, about reattaching a project map node.](https://docs.uniform.app/images/guides/composition/trash/project-map-reattach.png)

## Editions

Each [edition](https://docs.uniform.app/docs/guides/composition/editions) of an entry or composition is trashed and restored on its own.

- Deleting a base entry or composition also moves all of its editions to Trash.
- Deleting a single edition moves only that edition. If it was serving locales that no other published edition covers, those locales become inaccessible until you restore it or publish another edition.
- You can't restore an edition while its base is still in Trash. Restore the base first.
- A restored edition serves its locales again at its original priority.

## Assets

Moving an asset to Trash takes its file off the public CDN path, so direct file URLs stop working immediately. Restoring puts the file back at the same URL.

## Retention and permanent deletion

Items stay in Trash for the project's history retention period — the same limit that applies to content history, typically 30 days. After that, a daily job permanently deletes them.

Once an item is purged, Uniform can't recover it. Use a [CLI backup in Git](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-and-restore) if you have one.

## Permissions

| Action | Required permission |
| --- | --- |
| View Trash and open a trashed item | Existing **Read** permission for that type |
| Restore | **Update** permission for that type |
| Move to Trash | **Delete** permission for that type |

For details on configuring permissions, see [roles and permissions](https://docs.uniform.app/docs/guides/roles-and-permissions).

## API

Trash is exposed on the existing content APIs. Default list and get calls omit trashed items.

`GET` query parameter `deleted` on entries, compositions, assets, and release contents:

| Value | Result |
| --- | --- |
| `exclude` (default) | Only items that are not in Trash |
| `only` | Only items in Trash |
| `include` | Both |

| Endpoint | OpenAPI |
| --- | --- |
| `GET` / `DELETE` / `PUT` `/api/v1/entries` | _For the US region:_<br>_For the EU region:_<br> |
| `GET` / `DELETE` / `PUT` `/api/v1/canvas` | _For the US region:_<br>_For the EU region:_<br> |
| `GET` / `DELETE` / `PUT` `/api/v1/assets` | _For the US region:_<br>_For the EU region:_<br> |
| `GET` `/api/v1/release-contents` | _For the US region:_<br>_For the EU region:_<br> |

`DELETE` moves the item to Trash. `PUT` of a trashed id restores it (for a file-backed asset, include the original file reference). Responses may include `deletedAt` when the item is in Trash.

Searching, filtering, faceting, or custom sorting is not supported with `deleted` set to `only` or `include`.

The CLI uses the same API. See the [canvas commands](https://docs.uniform.app/docs/guides/cli/commands/canvas) for `remove`, and [sync](https://docs.uniform.app/docs/guides/cli/commands/sync) for what pull and push do with trashed items. `uniform canvas component remove` deletes component definitions, which don't go to Trash.

## What Trash does not do

- Restore a published version as published. Restored entries, compositions, and patterns are always drafts.
- Reattach a composition to its project map node.
- Restore an edition whose base is still in Trash.
- Keep release-only deletes after the release launches.
- Empty Trash or restore many items at once.
- Replace backups. After the retention period, only an external backup can bring the item back.

## Related

- [Favorites](https://docs.uniform.app/docs/guides/content-organization/favorites) — bookmark the items you use most.
- [My recents](https://docs.uniform.app/docs/guides/content-organization/my-recents) — return to the items you've most recently opened or edited.
- [Search, filter, and sort](https://docs.uniform.app/docs/guides/content-organization/search-filter-sort) — find a specific item across a listing.
