Check how Kimi is installed
Run these before uninstalling so you remove the right package.
command -v kimi
kimi --version
npm list -g --depth=0 | grep -i kimi
pnpm list -g --depth=0 | grep -i kimi
yarn global list | grep -i kimi
Kimi Code removal
Choose the right Kimi Code uninstall path for packages, IDE extensions, plugins, sessions, logs, and credentials.
Uninstall Kimi Code with the same channel that installed it. Then decide whether to keep or clear sessions, config, credentials, plugins, and logs. Those are separate choices.
For a normal uninstall, remove the app or global command and leave the data root alone. For a clean reset, export important sessions first and then clear the documented data folders.
Uninstall the binary first, then decide whether to preserve, move, or clear local data.
Run these before uninstalling so you remove the right package.
command -v kimi
kimi --version
npm list -g --depth=0 | grep -i kimi
pnpm list -g --depth=0 | grep -i kimi
yarn global list | grep -i kimi
Export before removing the command if you may need the latest context later.
mkdir -p "$HOME/kimi-code-backup"
kimi export -y -o "$HOME/kimi-code-backup/latest-session.zip"
Choose the one package-manager line that matches the install source.
npm uninstall -g <package-name>
pnpm remove -g <package-name>
yarn global remove <package-name>
Open a new terminal or refresh the shell hash before checking again.
hash -r
command -v kimi || echo "kimi is not on PATH"
Copy this prompt into Kimi Code, K3Nova, or another AI agent. Keep approval manual for file writes, shell commands, account actions, and secrets.
Use this to give the agent the task and safety boundary in one message.
You are my AI agent for this task: remove Kimi Code from the original install channel, verify PATH cleanup, and keep data-root deletion separate from package removal.
Start by restating the goal and the permissions you need.
Use official docs or the files I provide before making claims.
Give me a direct answer first, then a short table or checklist.
If commands are needed, show exact copyable commands without a shell prompt.
Ask before writing files, running shell commands, deleting or moving data, logging in, spending money, changing account settings, or handling API keys.
Stop and ask me when a step requires secrets, payment, account access, destructive cleanup, or a permission broader than the task.
| Permission | Give AI | Why |
|---|---|---|
| Inspection | Allow Read, Grep, Glob, and package-list commands. | The agent needs to find how Kimi Code was installed. |
| Backups | Ask before creating or moving backups. | Backup location and size should be visible. |
| Uninstall or move | Ask before npm, pnpm, yarn, mv, rm, rmdir, or credential cleanup. | Removal can be hard to undo. |
| Credentials | Deny reading or printing OAuth files, API keys, and MCP credentials. | The agent can describe paths without exposing secrets. |
| Install type | Removal path | Afterward |
|---|---|---|
| Global npm package | npm uninstall -g the package name you installed | Check that kimi is no longer on PATH |
| pnpm or yarn global install | Use the same global package manager | Open a new terminal before testing PATH |
| IDE extension | Remove from the editor extension manager | Restart the editor |
| Local data reset | Clear selected folders under KIMI_CODE_HOME | Export sessions first |
Use npm, pnpm, yarn, a native package, or your IDE extension manager depending on the original install path.
Disable or remove plugins when plugin behavior is the reason for uninstalling.
Use logout where available, then remove only the matching provider or MCP credential files if a deeper cleanup is required.
Open a new terminal and run which kimi or kimi --version. If it still responds, another install path remains.
Global package removal usually removes the command but leaves user data behind.
The VS Code extension is separate from the CLI executable and should be removed from the editor extension manager.
After uninstalling, move the data root aside instead of deleting it immediately. That gives you a rollback if you later need an old session.
Another install path may still be on PATH, or the terminal needs to be restarted.
Yes. Package reinstall can keep existing data unless you clear the data root.
Only if logout or package removal does not meet your cleanup goal, and only for the matching provider or MCP account.