---
title: Uninstall
description: Safely disconnect Memory Crystal from supported runtimes and CLIs without guessing at config files.
---

If you need to remove Memory Crystal, use the universal uninstall script instead of editing config files by hand.

Default behavior is intentionally conservative:

- remove the Memory Crystal integration wiring for supported clients
- preserve unrelated hooks and MCP entries
- stop the local Docker backend when installed, preserving Docker volumes
- keep shared `~/.memory-crystal` and `~/.memorycrystal` support files unless you explicitly pass `--purge`

## Universal uninstall

Use this when Memory Crystal was installed with the universal installer.

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash
```

Optional purge of local helper files and local backend artifacts:

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash -s -- --purge
```

Optional local Convex data wipe:

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash -s -- --purge --wipe-local-backend
```

What it does:

- removes the `crystal-memory` plugin wiring from `openclaw.json`
- clears the internal hook command mapping
- resets the OpenClaw memory slot back to `memory-core`
- removes the `crystal-memory` plugin and `memory_crystal` MCP wiring from Hermes Agent config when selected
- removes the `memory-crystal` MCP server from Claude/Codex/Factory Droid configs when present
- removes the universal generic MCP snippet at `~/.memorycrystal/mcp-config.json`
- stops the local Docker Convex backend when installed; volumes are preserved unless `--wipe-local-backend` is passed
- restarts the OpenClaw gateway when the CLI is available

You can scope cleanup with:

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash -s -- --targets codex-cli,generic-mcp
```

Supported universal targets are `openclaw`, `hermes`, `claude-code`, `claude-desktop`, `codex-cli`, `factory-droid`, `generic-mcp`, and `local-backend`.

## Hermes Agent

Use this when you installed Memory Crystal for Hermes Agent.

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash -s -- --targets hermes
```

Optional removal of the staged plugin bundle:

```bash
curl -fsSL https://memorycrystal.ai/uninstall.sh | bash -s -- --targets hermes --purge
```

What it does:

- removes `crystal-memory` from `~/.hermes/config.yaml`
- removes the `mcp_servers.memory_crystal` block
- removes Memory Crystal Hermes env keys from `~/.hermes/.env`
- preserves unrelated Hermes plugins, MCP servers, and env keys

## Legacy single-client scripts

The single-client uninstall scripts remain available for focused cleanup.

## Claude Code

Use this when you installed the Memory Crystal MCP integration for Claude Code.

```bash
curl -fsSL https://memorycrystal.ai/uninstall-claude-mcp.sh | bash
```

Optional purge of local helper files:

```bash
curl -fsSL https://memorycrystal.ai/uninstall-claude-mcp.sh | bash -s -- --purge
```

What it does:

- removes the `memory-crystal` MCP server from Claude config
- removes Memory Crystal hook entries from `~/.claude/settings.json`
- preserves any unrelated Claude hooks

## Codex CLI

Use this when you installed the Memory Crystal MCP integration for Codex CLI.

```bash
curl -fsSL https://memorycrystal.ai/uninstall-codex-mcp.sh | bash
```

Optional purge of local helper files:

```bash
curl -fsSL https://memorycrystal.ai/uninstall-codex-mcp.sh | bash -s -- --purge
```

What it does:

- removes the `memory-crystal` MCP block from `~/.codex/config.toml`
- removes Memory Crystal hook entries from `~/.codex/hooks.json`
- preserves unrelated Codex hooks and feature settings

## Factory Droid

Use this when you installed the Memory Crystal MCP integration for Factory Droid.

```bash
curl -fsSL https://memorycrystal.ai/uninstall-droid-mcp.sh | bash
```

Optional purge of local helper files:

```bash
curl -fsSL https://memorycrystal.ai/uninstall-droid-mcp.sh | bash -s -- --purge
```

What it does:

- removes the `memory-crystal` MCP server from Factory Droid
- removes Memory Crystal hook entries from `~/.factory/settings.json`
- preserves unrelated Factory Droid hooks


## When to use `--purge`

Use `--purge` only when you want to remove the local Memory Crystal helper files from `~/.memory-crystal` and `~/.memorycrystal` on that machine.

Do not use `--purge` if:

- another supported client on the same machine still uses Memory Crystal
- you want to keep the local helper files for a later reinstall

If you are debugging a bad install rather than leaving the product entirely, start with the default uninstall path, then reinstall cleanly.


## Local-first rollback

For local-first installs, the universal uninstall script stops the local backend by default while preserving Docker volumes.

If you only want to switch back to cloud mode, restore the installer-created config backup or re-run the installer and choose cloud.

Manual local backend stop remains available with the installed artifact's down or rollback command:

   ```bash
   ~/.memorycrystal/local-backend/<version>/bin/rollback
   ```
Keep the local backend directory until you are sure you do not need its data or rollback metadata.

Do not delete local backend data directories as a troubleshooting step unless you intentionally want to remove local memories.
