Quick Uninstall
Remove LongMem completely:Command Options
--yes / -y
Skip confirmation prompts and uninstall immediately:
--keep-data
Remove all LongMem files except your memory database:
~/.longmem/memory.db~/.longmem/memory.db-wal~/.longmem/memory.db-shm
--dry-run
Preview what will be removed without making any changes:
What Gets Removed
The uninstaller performs these steps:1. Stop the Daemon
Stops the running daemon using:- HTTP shutdown endpoint (
/shutdown) - SIGTERM signal to PID from
~/.longmem/longmemd.pid pkill -f longmemdas fallback
2. Remove System Service
Linux (systemd):- Stops and disables
longmem.service - Removes
~/.config/systemd/user/longmem.service - Reloads systemd daemon
- Unloads the service with
launchctl - Removes
~/Library/LaunchAgents/com.longmem.daemon.plist
3. Restore Client Configurations
Removes LongMem hooks and MCP configuration from: Claude Code:- Removes hooks from
~/.claude/settings.json - Removes MCP server configuration
- Creates backup:
settings.json.pre-longmem-uninstall-<timestamp>.bak
- Removes hooks from
~/.config/opencode/config.jsonoropencode.jsonc - Removes MCP server configuration
- Creates backup with timestamp
4. Move Installation Directory
Moves~/.longmem/ to a timestamped backup:
--keep-data is used, only moves non-database files and keeps the database in place.
From uninstall.ts:274-325
Backups Created
The uninstaller creates backups of:- System service files (systemd/launchd)
- Client configuration files (Claude Code, OpenCode)
- Entire
~/.longmem/directory
Restore from Backup
To restore after uninstalling:Manual Cleanup
If the uninstaller fails or you need to clean up manually:1. Stop Daemon
2. Remove Service (Linux)
3. Remove Service (macOS)
4. Remove Hooks from Claude Code
Edit~/.claude/settings.json and remove:
5. Remove Hooks from OpenCode
Edit~/.config/opencode/config.json and remove similar hooks and MCP configuration.
6. Remove Installation Directory
Verification
After uninstalling, verify removal:Reinstalling
To reinstall LongMem after uninstalling:--keep-data, your previous memory database will be preserved and reused.