> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Memory • AI Agent SDK

> delete_memory: Delete a specific memory by ID.

# delete\_memory

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Memory**](../classes/Memory) class in the [**memory**](../modules/memory) module.

Delete a specific memory by ID.

This is the unified deletion method that searches across all memory types
and all backends (SQLite, ChromaDB, Mem0, MongoDB).

Particularly useful for:

* Cleaning up image-based memories after processing to free context window
* Removing outdated or incorrect information
* Privacy compliance (selective erasure)

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def delete_memory(memory_id: str, memory_type: Optional[str]) -> bool
```

## Parameters

<ParamField query="memory_id" type="str" required={true}>
  The unique ID of the memory to delete
</ParamField>

<ParamField query="memory_type" type="Optional" required={false}>
  Optional type hint to narrow search: 'short\_term', 'long\_term' If None, searches all types.
</ParamField>

### Returns

<ResponseField name="Returns" type="bool">
  True if memory was found and deleted, False otherwise
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Delete a specific image analysis memory
    memory.delete_memory("1705123456789")

    # Delete with type hint for faster lookup
    memory.delete_memory("1705123456789", memory_type="short_term")
```

## Uses

* `delete_short_term`
* `delete_long_term`

## Used By

* [`Memory.delete_memories`](../functions/Memory-delete_memories)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/memory/memory.py#L1172">
  `praisonaiagents/memory/memory.py` at line 1172
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Memory Concept" icon="brain" href="/docs/concepts/memory" />

  <Card title="Memory Overview" icon="database" href="/docs/memory/overview" />

  <Card title="Memory Configuration" icon="gear" href="/docs/configuration/memory-config" />

  <Card title="Session Resume" icon="rotate-right" href="/docs/memory/session-resume" />
</CardGroup>
