Documentation Index
Fetch the complete documentation index at: https://docs.mem0.ai/llms.txt
Use this file to discover all available pages before exploring further.
Remove Memories Safely
Deleting memories is how you honor compliance requests, undo bad data, or clean up expired sessions. Mem0 lets you delete a specific memory, a list of IDs, or everything that matches a filter.Why it matters
- Satisfies user erasure (GDPR/CCPA) without touching the rest of your data.
- Keeps knowledge bases accurate by removing stale or incorrect facts.
- Works for both the managed Platform API and the OSS SDK.
Key terms
- memory_id – Unique ID returned by
add/searchidentifying the record to delete. - batch_delete – API call that removes up to 1000 memories in one request.
- delete_all – Filter-based deletion by user, agent, run, or metadata.
- immutable – Flagged memories that cannot be updated; delete + re-add instead.
How the delete flow works
Choose the scope
Decide whether you’re removing a single memory, a list, or everything that matches a filter.
Delete a single memory (Platform)
You’ll receive a confirmation payload. The dashboard reflects the removal within seconds.
Batch delete multiple memories (Platform)
Delete memories by filter (Platform)
agent_idrun_idmetadata(as JSON string)
Wildcard deletes
Setting a filter to"*" deletes all memories for that entity type across the entire project. This is an intentionally explicit opt-in to bulk deletion.
Delete with Mem0 OSS
The OSS JavaScript SDK does not yet expose deletion helpers—use the REST API or Python SDK when self-hosting.
Use cases recap
- Forget a user’s preferences at their request.
- Remove outdated or incorrect facts before they spread.
- Clean up memories after session expiration or retention deadlines.
- Comply with privacy legislation (GDPR, CCPA) and internal policies.
MCP Alternative: With Mem0 MCP, AI agents can delete their own memories when data becomes irrelevant or at user request.
Method comparison
| Method | Use when | IDs required | Filters |
|---|---|---|---|
delete(memory_id) | You know the exact record | ✔️ | ✖️ |
batch_delete([...]) | You have a list of IDs to purge | ✔️ | ✖️ |
delete_all(...) | You need to forget a user/agent/run | ✖️ | ✔️ |
Put it into practice
- Review the Delete Memory API reference, plus Batch Delete and Filtered Delete.
- Pair deletes with Expiration Policies to automate retention.
See it live
- Support Inbox with Mem0 demonstrates compliance-driven deletes.
- Data Management tooling shows how deletes fit into broader lifecycle flows.