# forget

Delete a reviewed memory, TODO, or Ledger record through the user-owned control boundary, with soft deletion recoverable and hard deletion permanent.

- Canonical: https://docs.xmemo.dev/docs/tools/forget
- Locale: en-US
- Content-Locale: en-US
- Canonical-Content-Digest: bb7f8a7e884de0a466e30a2d8258aa343fb87510c0c9530b1bf1ab2166c17e21
- Edition-Digest: d4f38c659adc6cb4db5863a194ae3618ec1196d60813eefe95f4fa625b35c050
- Source-Revision: sha256:baae372498e8bb0029d0bb3dbb87a802d40981f421cdfa74d518c0c5e6352ed3

## Tool Reference: `forget`

### Purpose

Delete a selected memory, TODO, or Ledger-backed record through the user-owned control boundary. The public contract covers soft and hard deletion only; use redact_memory to replace content in place.

### Parameters

- `memory_id` (string, optional): Exact reference of the record to remove. Preferred over target.
- `target` (string, optional): Descriptive target when no exact reference is available.
- `mode` (string, optional, default: soft): 'soft' (default, recoverable) or 'hard' (permanent, requires explicit user confirmation first). The 'soft_delete' and 'hard_delete' aliases are accepted, and an empty value means soft. Any other value is rejected.
- `reason` (string, optional): Short audit reason recorded with the deletion.

### Returns

Success text reports the affected opaque reference and lifecycle status. Soft deletion remains recoverable through the restore path; hard deletion does not.

### Errors

- Validation failure: a mode other than 'soft'/'soft_delete'/'hard'/'hard_delete' is supplied, or replacement_content is set (use redact_memory).
- 401/403: the token lacks the required write/delete capability or cannot access the target.
- Ambiguous target: query_hint matches multiple records or no exact target can be established.
- Invalid mode: hard deletion is not inferred, and unsupported modes are rejected on the public surface.
- Not found or lifecycle conflict: the selected memory, TODO, or Ledger record is already absent or changed.

### Examples

#### Recoverably remove an exact record



```typescript
forget({
  target: "memory-id-from-recall",
  mode: "soft",
  reason: "User requested removal"
})
```

### Related Tools

- [search_memory](/docs/tools/search): Find a strict, authorized result before destructive action.
- [remember](/docs/tools/remember): Create a new durable record only when it is actually needed.
- [todos](/docs/tools/todos): Manage task state directly; use forget only for a reviewed delete.
- [ledger](/docs/tools/ledger): Manage financial records through the governed Ledger dispatcher.

## Verify a deletion

Re-run the search that previously returned the memory. Deletion is only confirmed when the entry no longer appears.

```ts
search_memory({ query: "<the removed content>", limit: 5 })
// -> the removed entry must be absent
```

