Skip to content
maenifold
GitHub

DeleteMemory

Permanently removes memory files from disk with confirmation safety.

Permanently removes memory files from disk with confirmation safety.

Parameters

  • identifier (string, required): Memory FILE identifier - URI (memory://path/file) or title
  • confirm (bool, optional, default: false): MUST be true to execute deletion

Returns

Example

Constraints

  • Irreversible: No recovery mechanism - file deleted immediately from disk
  • Confirmation required: Operation fails if confirm != true
  • Graph lag: Concepts removed from graph on next Sync, not immediately
  • Orphan concepts: Deleting sole source of [[WikiLinks]] like [[unique-concept]] creates orphaned graph nodes

Integration

  • ReadMemory: Verify content before deletion
  • ExtractConceptsFromFile: Check which [[WikiLinks]] like [[research-data]], [[analysis]] will be affected
  • BuildContext: Assess relationship impact before deletion
  • Sync: Run after deletion to clean orphaned concepts from graph
  • SearchMemories: Find files to delete by pattern

Common Patterns

Pre-deletion verification:

Cleanup workflow:

Errors

  • "Must set confirm=true to delete" → Add "confirm": true to payload
  • "Memory file not found" → Verify identifier with SearchMemories or ReadMemory