---
summary: "Uninstall Mnemo completely (CLI, service, state, workspace)"
read_when:
  - You want to remove Mnemo from a machine
  - The gateway service is still running after uninstall
title: "Uninstall"
---

Two paths:

- **Easy path** if `mnemo` is still installed.
- **Manual service removal** if the CLI is gone but the service is still running.

## Easy path (CLI still installed)

Recommended: use the built-in uninstaller:

```bash
mnemo uninstall
```

When using the CLI, state removal preserves configured workspace directories unless you also select `--workspace`.

Non-interactive (automation / npx):

```bash
mnemo uninstall --all --yes --non-interactive
npx -y mnemo uninstall --all --yes --non-interactive
```

Manual steps (same result):

1. Stop the gateway service:

```bash
mnemo gateway stop
```

2. Uninstall the gateway service (launchd/systemd/schtasks):

```bash
mnemo gateway uninstall
```

3. Delete state + config:

```bash
rm -rf "${MNEMO_STATE_DIR:-$HOME/.mnemo}"
```

If you set `MNEMO_CONFIG_PATH` to a custom location outside the state dir, delete that file too.
If you want to keep a workspace inside the state dir, such as `~/.mnemo/workspace`, move it aside before running `rm -rf` or delete state contents selectively.

4. Delete your workspace (optional, removes agent files):

```bash
rm -rf ~/.mnemo/workspace
```

5. Remove the CLI install (pick the one you used):

```bash
npm rm -g mnemo
pnpm remove -g mnemo
bun remove -g mnemo
```

6. If you installed the macOS app:

```bash
rm -rf /Applications/Mnemo.app
```

Notes:

- If you used profiles (`--profile` / `MNEMO_PROFILE`), repeat step 3 for each state dir (defaults are `~/.mnemo-<profile>`).
- In remote mode, the state dir lives on the **gateway host**, so run steps 1-4 there too.

## Manual service removal (CLI not installed)

Use this if the gateway service keeps running but `mnemo` is missing.

### macOS (launchd)

Default label is `ai.mnemo.gateway` (or `ai.mnemo.<profile>`; legacy `com.mnemo.*` may still exist):

```bash
launchctl bootout gui/$UID/ai.mnemo.gateway
rm -f ~/Library/LaunchAgents/ai.mnemo.gateway.plist
```

If you used a profile, replace the label and plist name with `ai.mnemo.<profile>`. Remove any legacy `com.mnemo.*` plists if present.

### Linux (systemd user unit)

Default unit name is `mnemo-gateway.service` (or `mnemo-gateway-<profile>.service`):

```bash
systemctl --user disable --now mnemo-gateway.service
rm -f ~/.config/systemd/user/mnemo-gateway.service
systemctl --user daemon-reload
```

### Windows (Scheduled Task)

Default task name is `Mnemo Gateway` (or `Mnemo Gateway (<profile>)`).
The task script lives under your state dir.

```powershell
schtasks /Delete /F /TN "Mnemo Gateway"
Remove-Item -Force "$env:USERPROFILE\.mnemo\gateway.cmd"
```

If you used a profile, delete the matching task name and `~\.mnemo-<profile>\gateway.cmd`.

## Normal install vs source checkout

### Normal install (install.sh / npm / pnpm / bun)

If you used `https://mnemo.ai/install.sh` or `install.ps1`, the CLI was installed with `npm install -g mnemo@latest`.
Remove it with `npm rm -g mnemo` (or `pnpm remove -g` / `bun remove -g` if you installed that way).

### Source checkout (git clone)

If you run from a repo checkout (`git clone` + `mnemo ...` / `bun run mnemo ...`):

1. Uninstall the gateway service **before** deleting the repo (use the easy path above or manual service removal).
2. Delete the repo directory.
3. Remove state + workspace as shown above.

## Related

- [Install overview](/install)
- [Migration guide](/install/migrating)
