Delete Memory

Permanently removes a memory FILE from the file system and knowledge graph.

This tool provides safe deletion of memory files with mandatory confirmation to prevent accidental data loss. When a file is deleted, it is completely removed from disk and will no longer appear in searches, context building, or graph relationships after the next sync operation.

When to Use This Tool

Key Features

Parameters

ParameterTypeRequiredDescriptionExample
identifierstringYesMemory FILE identifier (memory:// URI or title)“memory://notes/project-notes.md” or “Project Notes”
confirmboolNoMust be set to true to confirm deletiontrue

Usage Examples

Basic File Deletion

{
  "identifier": "Project Planning Session",
  "confirm": true
}

Permanently deletes the file with title “Project Planning Session”.

URI-Based Deletion

{
  "identifier": "memory://experiments/test-workflow.md",
  "confirm": true
}

Deletes the specific file at the given memory:// URI path.

Safety Check (Confirmation Required)

{
  "identifier": "Important Research Notes",
  "confirm": false
}

Returns error: “Must set confirm=true to delete a memory file” - prevents accidental deletion.

Common Patterns

Graph Impact and Relationships

Concept Graph Effects

When you delete a memory file, the following happens to the knowledge graph:

Impact Assessment Workflow

Before deleting important files:

  1. Use ExtractConceptsFromFile to see what [[concepts]] will be affected
  2. Use BuildContext to understand which concept relationships depend on this file
  3. Use SearchMemories to find other files that contain the same concepts
  4. Only delete if concepts exist in other files or are truly obsolete

Troubleshooting

Common Errors and Solutions

Best Practices for Safe Deletion

  1. Always verify first: Use ReadMemory to confirm file contents before deletion
  2. Check concept dependencies: Use BuildContext to understand graph impact
  3. Consider archiving: Use MoveMemory to relocate instead of delete for important content
  4. Sync after cleanup: Run Sync after deletion sessions to update the concept graph
  5. Batch cleanup carefully: Delete files one at a time to avoid accidental mass deletion

Security and Safety

Performance Considerations