# Uninstall the CLI

URL: https://forculuslabs.tech/docs/get-started/uninstall/

> Remove forculus from your computer with forculus uninstall, or by hand for each way you installed it. Your apps stay.

`forculus uninstall` takes the CLI off this computer: its session, its files and the program. It doesn’t touch anything on Forculus. Your apps, workspaces and account stay as they are. To delete those too, see [Delete your apps, workspaces or account](https://forculuslabs.tech/docs/get-started/uninstall/#delete-your-apps-workspaces-or-account).

## Run forculus uninstall

```sh
forculus uninstall
```

It lists what it’s going to remove and asks before it removes anything. To go ahead without the question, in a script for example, add `--yes`. With no terminal to ask at, it stops unless you pass `--yes`.

```sh
forculus uninstall --yes
```

In order, it:

1. Revokes the bypass tokens your agent made on this computer, and deletes the files in `tokens/` that hold their secrets. A token it can’t revoke, because nobody is signed in or it was made on another platform, still loses its file, and the CLI names it so you can revoke it in the dashboard.
2. Ends this computer’s session, the way `forculus logout` does. If it can’t reach Forculus, it says so and carries on. The session then works until it expires, or until you revoke it in the dashboard: open the account menu and choose **Sessions**.
3. Deletes the config directory. It only deletes files the CLI wrote there, `config.json` and the token files, and then the directory if nothing else is in it. Anything else stays where it is, and so does the directory, and the CLI lists what’s left. A config directory that’s a symlink isn’t touched.
4. Removes the program, if the install script put it there, along with the lines the script added to your shell’s startup files. For Homebrew, npm, cargo and Windows, it prints the command to run instead. See [What it does for each install](https://forculuslabs.tech/docs/get-started/uninstall/#what-it-does-for-each-install).
5. Takes `forculus` out of `.cursor/mcp.json` in the directory you run it from, keeping every other server in the file. It prints how to take it out of your other agents. See [Remove it from your agents](https://forculuslabs.tech/docs/get-started/uninstall/#remove-it-from-your-agents).

To keep your settings, for example because you’re about to install again a different way, add `--keep-config`. The tokens are still revoked and the session still ends.

With `--json`, it prints what it did as one JSON object, with `session`, `tokens`, `config`, `binary` and `agents`.

When it’s done, it says what it removed:

```text
Signed out, and ended this computer's session.
Revoked 1 bypass token your agent made here.
Deleted 1 secret file from /Users/ada/.config/forculus/tokens.
Removed the config directory, /Users/ada/.config/forculus.
Deleted /Users/ada/.forculus/bin/forculus.
Took the line the install script added out of /Users/ada/.profile, /Users/ada/.zshrc.
```

Open a new terminal afterwards, so your shell stops looking for `forculus` on the old `PATH`.

## What it does for each install

The CLI tells how it was installed from where the program is.

**Install script**

On macOS and Linux, `forculus uninstall` does all of this itself.

The script put the program in `~/.forculus/bin`, or `$FORCULUS_HOME/bin` if you set `FORCULUS_HOME`. `forculus uninstall` deletes it, and the directory once it’s empty.

The script also added this line to your shell’s startup files, `.profile`, `.bashrc`, `.bash_profile`, `.bash_login`, `.zshrc` and `.zshenv`:

```sh
. "$HOME/.config/forculus/env.sh"
```

and made `~/.config/fish/conf.d/forculus.env.fish` for fish. `forculus uninstall` takes out only lines exactly like that one, along with the blank line the script put before each, and leaves the rest of each file as it was. It deletes fish’s file if nothing else is in it.

It deletes the files the script wrote in `~/.config/forculus`: `env.sh`, `env.fish` and `forculus-receipt.json`. An env script you’ve changed since is yours, so it stays. A startup file that’s a symlink, into a dotfiles repository say, isn’t changed, and the CLI prints the line for you to take out.

To do it by hand instead:

```sh
rm ~/.forculus/bin/forculus
rm ~/.config/forculus/env.sh ~/.config/forculus/env.fish ~/.config/forculus/forculus-receipt.json
rm ~/.config/fish/conf.d/forculus.env.fish
```

Then delete the `. "$HOME/.config/forculus/env.sh"` line from your startup files. An older install script ran `$HOME/.forculus/bin/env` instead, from the same files.

**Windows**

Windows can’t delete a program while it’s running, so `forculus uninstall` prints the PowerShell commands that finish the job. Run them once it’s done. They delete the program, take its directory off your user `Path`, and delete the receipt the install script left. For an install into `FORCULUS_HOME`, they name that directory, which the receipt keeps:

```powershell
Remove-Item -LiteralPath "$HOME\.forculus\bin\forculus.exe"
$p = [Environment]::GetEnvironmentVariable('Path', 'User'); [Environment]::SetEnvironmentVariable('Path', (($p -split ';') | Where-Object { $_ -and ($_ -replace '/', '\').TrimEnd('\') -ne "$HOME\.forculus\bin" }) -join ';', 'User')
Remove-Item "$env:LOCALAPPDATA\forculus\forculus-receipt.json"
```

The config directory is `%APPDATA%\forculus`, which `forculus uninstall` deletes.

**Homebrew**

Homebrew keeps its own record of what it installed, so `forculus uninstall` leaves the program and tells you to run:

```sh
brew uninstall forculus
```

To stop Homebrew checking our tap for updates too, run `brew untap Forculus-Labs/tap`.

**npm**

npm keeps its own record of what it installed, so `forculus uninstall` leaves the program and tells you to run:

```sh
npm uninstall -g forculus
```

**cargo**

If you built the CLI from source with `cargo install --path crates/cli`, `forculus uninstall` leaves the program and tells you to run:

```sh
cargo uninstall forculus-cli
```

If the program is somewhere none of these put it, `forculus uninstall` prints its path and asks you to delete it, along with anything you added to your `PATH` for it.

### Remove the config directory by hand

Sign out first, so the session ends on Forculus and not only on this computer:

```sh
forculus logout
```

Then delete the directory. It’s `$FORCULUS_CONFIG_DIR` if you set that, then `$XDG_CONFIG_HOME/forculus`, then `~/.config/forculus`, and `%APPDATA%\forculus` on Windows:

```sh
rm -r ~/.config/forculus
```

Bypass tokens your agent made are still valid until they expire. Revoke them first with `forculus token revoke`, or in the dashboard.

## Remove it from your agents

`forculus uninstall` takes `forculus` out of the Cursor config in the directory you run it from. Wherever else you added it, take it out there:

**Claude Code**

```sh
claude mcp remove forculus
```

If you installed the plugin:

```sh
claude plugin uninstall forculus@forculus
claude plugin marketplace remove forculus
```

**Codex**

```sh
codex mcp remove forculus
```

Or delete the `[mcp_servers.forculus]` section from `~/.codex/config.toml`. If you installed the plugin:

```sh
codex plugin remove forculus@forculus
codex plugin marketplace remove forculus
```

**Cursor**

`forculus mcp install cursor` wrote `forculus` into each project’s `.cursor/mcp.json`. Run `forculus uninstall` from one of those projects and it takes it out of that one. For the others, delete the `forculus` entry from the file, and leave the rest of it.

## Delete your apps, workspaces or account

Uninstalling the CLI leaves everything on Forculus running. To delete it too, do that before you uninstall, or in the dashboard afterwards:

- An app: `forculus app delete acme/hello --yes`, or in the dashboard, under the app’s **Settings**, then **Danger zone**. Its versions, data, secrets and tokens go with it. See [Delete an app](https://forculuslabs.tech/docs/access/workspaces/#delete-an-app).
- A workspace: in the dashboard, under the workspace’s **Settings**, then **Danger zone**. Only an owner can, and the CLI can’t. See [Workspace roles](https://forculuslabs.tech/docs/access/workspaces/#workspace-roles).
- Your account: in the dashboard, open the account menu and choose **Delete account**. If you’re the only owner of a workspace or an app, hand it to another owner or delete it first.
