> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data.md).

# Clean & delete data

Remove data by policy with cleaning rules, or on request for an individual user.

## Your goal

Make sure data leaves the datamart when it should - automatically according to your retention policy, and on demand when a person asks.

## Expected outcome

Cleaning rules that implement your policy, and a repeatable procedure for individual deletion requests.

## Two different jobs

| Job                                                                         | Mechanism                              | Page                                                                                                          |
| --------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **By policy** - every event and profile expires after a duration you decide | Cleaning rules, computed at write time | [Cleaning rules](/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data/cleaning-rules.md)     |
| **On request** - one person's data must go now                              | Deletion APIs and deletion imports     | [Delete user data](/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data/delete-user-data.md) |

They are complementary. Cleaning rules keep the datamart in line with your policy over time; deletion handles the individual case that cannot wait for an expiration date.

{% hint style="danger" %}
**Cleaning rules are not retroactive.** The expiration timestamp is computed when an object enters the datamart and cannot be modified afterwards. Changing the rules only affects future incoming events and profiles - so a rule created today does nothing about the data you already hold.
{% endhint %}

## How a UserPoint disappears

Worth understanding, because it is not a deletion you trigger:

{% hint style="info" %}
When a UserPoint has **no activity, no profile, and no `USER_LIST` segment**, it is removed from the platform. By cleaning activities and profiles, cleaning rules therefore clean your UserPoints too.
{% endhint %}

## In this section

<table data-view="cards" data-search="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Cleaning rules</strong></td><td>Retention as policy: actions, filters, priorities, lifecycle.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data/cleaning-rules.md">Cleaning rules</a></td></tr><tr><td><strong>Delete user data</strong></td><td>Removing a person's data, one by one or in bulk.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data/delete-user-data.md">Delete user data</a></td></tr></tbody></table>

## Related pages

<table data-view="cards" data-search="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Data retention</strong></td><td>Deciding the policy in the first place.</td><td><a href="/setup-and-monitor/plan-and-integrate/set-up-the-environment/manage-data-retention.md">Data retention</a></td></tr><tr><td><strong>Exercise rights of the user</strong></td><td>The compliance framing of individual requests.</td><td><a href="/setup-and-monitor/ensure-privacy-and-compliance/exercise-rights-of-the-user.md">Exercise rights of the user</a></td></tr><tr><td><strong>Import identifiers</strong></td><td>Deleting identifiers without deleting the user.</td><td><a href="/setup-and-monitor/collect-and-manage-your-data/import-data-in-batch/import-identifiers.md">Import identifiers</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/setup-and-monitor/collect-and-manage-your-data/clean-and-delete-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
