Uninstall
No. 010The uninstaller removes what the installer and cube setup put on your
machine, for your own account, and nothing else. Run it as yourself, not with
sudo.
Linux and macOS:
curl -fsSL https://happonomyorg.github.io/cube-releases/uninstall.sh | shWindows (PowerShell 5.1 or 7):
irm https://happonomyorg.github.io/cube-releases/uninstall.ps1 | iexTo see what it would do first, without changing anything:
curl -fsSL https://happonomyorg.github.io/cube-releases/uninstall.sh | sh -s -- --dry-run$env:CUBE_UNINSTALL_DRY_RUN = '1'; irm https://happonomyorg.github.io/cube-releases/uninstall.ps1 | iexTo read a script before it runs, download it, read it and run the saved
copy (sh uninstall.sh, or .\uninstall.ps1 in PowerShell). From the next
release on, both are also files of each release, like the installers, so you
can compare them with GitHub’s record (see
check the script first).
Your knowledge bases come first
Section titled “Your knowledge bases come first”cube setup turns on The Cube’s git hooks in a knowledge base. Those hooks
call cube, and they stop a commit when cube is gone. So the uninstaller
first unhooks every knowledge base it is pointed at:
- the git repository you run it in;
- each knowledge base you name:
sh -s -- ~/notes ~/work/kb(Windows: setCUBE_UNINSTALL_KBSto the folders, separated by;); - each one it finds under a folder you give:
sh -s -- --find ~/work(Windows:CUBE_UNINSTALL_FIND).
In each one it removes core.hooksPath when it is .cube/hooks, and then
merge.ff when it is false, the two settings cube setup makes. A
repository with other hooks stays as it is.
The files cube adopt committed to a knowledge base (.cube/ and
.claude/skills/cube/) are part of it, so the uninstaller never changes
them. It names them; remove them with a normal commit if you no longer want
them.
If cube setup ran on your account but the uninstaller unhooked no knowledge
base, it ends with a warning. Then, in each knowledge base where you ran
cube setup:
git config --unset core.hooksPathgit config --unset merge.ffWhat it removes
Section titled “What it removes”| What | Linux and macOS | Windows |
|---|---|---|
| The programs | cube, cube-index and cube-graph in ~/.local/bin (or CUBE_INSTALL_DIR), each only when it reports its own name and a version |
cube.exe, cube-index.exe and cube-graph.exe in %LOCALAPPDATA%\Programs\cube (or CUBE_INSTALL_DIR), the same way; the .old.exe copies an update left; the folder, when nothing else is in it |
| What an interrupted install left | .cube-new.* in the install folder, .cube-install.* beside it |
the same |
| Your PATH | nothing (the installer never changed it) | the install folder, from your user PATH |
Global git settings cube setup wrote |
cube.path, cube.gitPath, cube.ghPath, cube.python3Path, cube.allowUserOwned |
the same |
| The hook cache | ~/.cache/cube (or $XDG_CACHE_HOME/cube); macOS: ~/Library/Caches/org.Happonomy.cube |
%LOCALAPPDATA%\Happonomy\cube\cache |
A program with one of those names that does not report itself as The Cube
stays, with a warning, and so does a symbolic link the installer did not
make. On Linux and macOS, if you added the install folder to your PATH in
a startup file, that line stays: remove it yourself if you added it only
for The Cube.
On Windows, close every window that runs cube first; a running program
cannot be removed. Open a new terminal afterwards for the PATH change.
By hand
Section titled “By hand”On Linux and macOS, in this order:
# 1. in each knowledge base where you ran cube setupgit config --unset core.hooksPathgit config --unset merge.ff# 2. the global settings cube setup wrotegit config --global --remove-section cube# 3. the programs and the hook cacherm ~/.local/bin/cube ~/.local/bin/cube-index ~/.local/bin/cube-graphrm -rf ~/.cache/cubeOn Windows, delete %LOCALAPPDATA%\Programs\cube and remove that folder from
your user PATH in “Edit environment variables for your account”. Avoid a
one-line [Environment]::SetEnvironmentVariable for the PATH: it saves it as
a plain string, and entries such as %USERPROFILE%\... stop working.