gentle-shell self-uninstall removes what Gentle Shell created and then the
gentle-pi package. It always prints the full plan first, and nothing is removed
until you confirm.
gentle-shell self-uninstall --dry-run # only print the plan
gentle-shell self-uninstall # print the plan, then ask
gentle-shell self-uninstall --yes # remove without asking; keeps shared configuration
gentle-shell self-uninstall --yes --include-sharedgentle-shell uninstall <source> is a different command: it is Pi's own alias
for remove, forwarded to the resolved home, and stays unchanged.
In this order:
- Gentle Shell's own data, each only when it is a real directory or file
(never a symbolic link):
<config home>/main/: main-channel builds, only when it holds nothing but what the main channel writes (gentle-ai/<commit>/gentle-ai[.exe],packages/gentle-pi-*.tgz,.build,.source); otherwise it is listed as kept.<config home>/channel.json: the recorded update channel.<config home>/dev-binary.json, only when it points at a main-channel build under<config home>/main/gentle-ai. A dev binary you registered yourself is kept.<config home>/tools/go: the Go the installer downloaded for builds, only when every entry is a pinned-Go version folder carrying the installer's.gentle-shell-gomarker; otherwise it is listed as kept.- The isolated home:
GENTLE_SHELL_HOME, or~/.gentle-shell/agent. It holds the sign-ins, chats and settings of Gentle Shell sessions. AGENTLE_SHELL_HOMEdirectory is removed only when Gentle Shell created it (its.gentle-shell-homemarker, or its setup record in~/.gentle-shell/config.json); otherwise it is listed as kept. ~/.gentle-shell/gentle-ai: the isolated home's own settings (profiles, banner and the other preferences). Thegentle-aifolder next to aGENTLE_SHELL_HOMEis only listed as kept, since it may not be Gentle Shell's. WhenGENTLE_PI_CONFIG_HOMEnames it, the config home rules below apply instead.~/.gentle-shell/config.json: the launcher settings.
- Shared Gentle AI configuration, only when you accept it (see below).
- The
gentle-pipackage, with the package manager that owns it:pnpm remove -g gentle-piunderPNPM_HOME, otherwisenpm uninstall -g gentle-pi. ~/.gentle-shell, only when it is empty.
The config home is GENTLE_PI_CONFIG_HOME, or ~/.pi/gentle-ai: the one Pi
with Gentle AI, --link and custom homes use, and where the main channel keeps
its builds. The isolated home's own folder is removed with the data above.
Pi with Gentle AI uses the same files in the config home, so they are kept by
default: profiles.json, profiles.export.json, banner.json,
builtin-codemode-optout.json, background-subagents.json,
double-esc-cancel.json, runtime-guardrails.json and persona.json.
- In a terminal, after you confirm the plan, a separate question asks whether to remove them; the default is No, and so is end of input (Ctrl-D).
- With
--yes, they are kept unless you also pass--include-shared. --include-sharedremoves them without the separate question.
Only those exact files are removed; anything else in the config home stays.
- Your Pi home (
~/.pi/agent,PI_CODING_AGENT_DIRorGENTLE_SHELL_USER_PI_HOME) and itssettings.json. - Custom homes used with
--home <path>, recorded in~/.gentle-shell/config.json; the plan lists them as not touched. - Gentle AI's own state in
~/.gentle-ai, and each project's.pi/gentle-aifolder. - Tools the web installer may have added. The plan lists them with how to remove
them yourself: Pi (
pnpm remove -g @earendil-works/pi-coding-agentornpm uninstall -g @earendil-works/pi-coding-agent), Engram (installed by Gentle AI's setup), the PATH entrypnpm setupadded and, on Windows,%USERPROFILE%\.pnpm.
It refuses, before removing anything, when one of the places it removes from —
the isolated home, the config home or ~/.gentle-shell — checked at its real
path (after following symbolic links, including linked parent folders):
- is or contains your home directory;
- is, contains or lies inside your Pi home (
~/.pi/agent,PI_CODING_AGENT_DIRorGENTLE_SHELL_USER_PI_HOME) or Gentle AI's state in~/.gentle-ai. Inside a Gentle Shell session,PI_CODING_AGENT_DIRis the isolated home itself and your Pi home travels inGENTLE_SHELL_USER_PI_HOME: when that variable names an existing directory other than the isolated home, aPI_CODING_AGENT_DIRequal to the isolated home is not treated as your Pi home, so the command also works from inside a session; - is, contains or lies inside a
.pidirectory, such as a project's.pior.pi/gentle-ai(containing means a.pidirectly inside it). The default config home,~/.pi/gentle-ai, is the only.pilocation allowed; - for the isolated home and the config home: is, contains or lies inside the other;
- would remove a path that is, holds or lies inside a custom
--homehome or another path the plan lists as not touched; GENTLE_SHELL_HOMEorGENTLE_PI_CONFIG_HOMEis not an absolute path;- neither pnpm nor npm owns the installation (an
npm linkof a source checkout, for example), or the owning package manager is not onPATH. Remove that installation the way you made it.
| Exit code | Meaning |
|---|---|
| 0 | Removed, or --dry-run printed the plan. |
| 1 | Refused, cancelled, interrupted, or a removal failed. A refusal exits 1 even with --dry-run, since the real run would refuse too. |
| 2 | Usage error, including no terminal to confirm in without --yes. |
At the questions:
- Ctrl-C at any question stops the whole uninstall: it exits 1 and removes nothing (both questions come before any removal).
- End of input (Ctrl-D, or a closed stdin) answers No: at the first question it cancels (exit 1, nothing removed); at the shared-configuration question it keeps the shared files and the uninstall goes on.
A refused plan lists no Gentle Shell data to remove, so no path ever appears both as removed and as not touched.
When a removal fails, it stops there: the gentle-pi package and everything
after it are kept, so gentle-shell self-uninstall is still there to run again.
When only the package removal fails, it prints the command to run yourself.
It runs before any Pi runtime check, so it also works when Pi is missing.
pnpm and npm run the same verified way gentle-shell upgrade runs them: through
node.exe and the package manager's own JavaScript entry (or its native .exe),
never a .cmd or .bat shim, which cannot run without a shell. A package manager
that resolves only to such a shim counts as missing, and the command refuses
before removing anything.
Removing the running gentle-pi package with pnpm or npm on Windows has not been
verified yet. If the package manager fails, Gentle Shell's data is already gone
and the command prints the exact pnpm remove -g gentle-pi or
npm uninstall -g gentle-pi to run from a new terminal.