---
title: "Remove erased people from every model · Agent Wranglers"
url: https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model/erasure-from-models
id: MLO-44
level: Required
applies: ai-features
risk: law
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1112
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Remove erased people from every model trained on their data

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [People affected by the model](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: MLO-44
- Level: Required
- Chapter: [People affected by the model](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model.md)
- Rule: When a person's data must be erased, drop their rows from every snapshot used for future training. Retrain each model that learned from them within a set time, such as 90 days, unless its membership test shows it holds no personal data.
- Check: A test erases a person and builds a new snapshot, and none of their rows appear in it. A script lists every production model trained on a snapshot holding erased rows. It fails when one is older than the set time and has no passing membership test.
- Risk: A law broken
- Applies when: The project uses AI models.
- How: Deleting the source row does not remove what a model learned. A model that is not anonymous is personal data itself, so erasure reaches it too. Keep a list of erased person keys, and filter it out of every new snapshot, as [freeze each training set as a versioned snapshot](https://agentwranglers.se/playbook/machine-learning/training-data/data-snapshots.md) allows. Map each person key to the snapshots and models that used it. A model that passes [test that the model does not give away its training records](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model/training-data-extraction-test.md) may wait for its next scheduled retrain. Others retrain within the set time. Methods that make a model forget without retraining are still research, so do not rely on them alone. Language model stores follow [erase a person's data from every AI store](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback/erase-from-ai-stores.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Python example

```python
def build_snapshot(rows: pd.DataFrame, erased_keys: set[str]) -> pd.DataFrame:
    return rows[~rows["person_key"].isin(erased_keys)]

def models_due_for_retrain(models: list[ModelVersion], today: date) -> list[ModelVersion]:
    return [m for m in models if m.has_erased_rows and not m.membership_test_passed
            and (today - m.first_erasure_date).days > ERASURE_RETRAIN_DAYS]
```

### TypeScript example

```ts
export function buildSnapshot(rows: TrainingRow[], erasedKeys: Set<string>): TrainingRow[] {
  return rows.filter(row => !erasedKeys.has(row.personKey));
}
```

## Sources

- [GDPR Article 17 on the right to erasure](https://eur-lex.europa.eu/eli/reg/2016/679/oj)
- [EDPB Opinion 28/2024 on AI models and personal data](https://www.edpb.europa.eu/system/files/2024-12/edpb_opinion_202428_ai-models_en.pdf)

## Related rules

- MLO-6 [Freeze each training set as a versioned snapshot](https://agentwranglers.se/playbook/machine-learning/training-data/data-snapshots.md) in Machine learning
- MLO-41 [Test that the model does not give away its training records](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model/training-data-extraction-test.md) in Machine learning
- AIF-51 [Erase a person's data from every AI store](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback/erase-from-ai-stores.md) in AI features

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model/erasure-from-models">Agent Wranglers machine learning playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Test that the model does not give away its training records](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model/training-data-extraction-test.md)
- [People affected by the model](https://agentwranglers.se/playbook/machine-learning/people-affected-by-the-model.md)
