Kimi Code cleanup

Uninstall Kimi Code Safely

Remove Kimi Code from npm, pnpm, yarn, native installs, IDE extensions, and local login state without deleting the wrong data.

Developer cleanup checklist for Kimi Code
Cleanupreading path
Kimi K3frontier example
8source links
2026-07-29updated

Keep what matters before you remove anything

First identify how Kimi Code was installed. Removing a global npm package is different from removing a native app, VS Code extension, plugin, or the local data directory that stores sessions and credentials.

If you only want to stop the CLI, uninstall the package or app. If you want a clean account state, sign out and remove the documented credential or data folders after exporting anything you still need.

Copyable commands

Use the same install channel that originally added Kimi Code. Move data aside before deleting anything permanently.

Find the active Kimi command

This tells you which package manager or installer probably owns the executable.

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 the latest session first

Keep a session archive before touching credentials, plugins, or the data root.

mkdir -p "$HOME/kimi-code-backup"
kimi export -y -o "$HOME/kimi-code-backup/latest-session.zip"

Uninstall with the matching package manager

Run only the line that matches how Kimi Code was installed.

npm uninstall -g <package-name>
pnpm remove -g <package-name>
yarn global remove <package-name>

Move the data root aside for a clean reset

This preserves a rollback copy instead of deleting local state immediately.

KIMI_CODE_HOME="${KIMI_CODE_HOME:-$HOME/.kimi-code}"
mkdir -p "$HOME/kimi-code-backup"
test -d "$KIMI_CODE_HOME" && mv "$KIMI_CODE_HOME" "$HOME/kimi-code-backup/kimi-code-home-$(date +%Y%m%d-%H%M%S)"

Decision checklist

Use this section to keep the next step practical before you touch accounts, files, infrastructure, or hardware.

CheckLook forWhy it matters
Keep firstIdentify sessions, config, plugins, logs, and credentials before removing an app or command.Cleanup is safer when data deletion stays separate from uninstalling.
Confirm install sourceCheck whether the tool came from npm, pnpm, Homebrew, an app bundle, or a manual download.The right removal path depends on the original channel.
Protect credentialsDo not display raw tokens or OAuth files while checking paths.The goal is to remove risk, not expose secrets.
Verify after cleanupReopen a terminal and confirm PATH, config folders, and app entries behave as expected.A clean uninstall needs evidence, not just a deleted file.

Uninstall decision table

GoalActionAvoid
Remove the commandUninstall with the original package manager or app installerDeleting sessions when the executable is the only problem
Reset configurationRemove config.toml or set a fresh KIMI_CODE_HOMEOverwriting a working config without a backup
Clear login stateUse logout or remove the matching credential fileDeleting unrelated MCP or provider credentials
Remove all local Kimi Code dataDelete the data root only after exportAssuming this can be undone

Safe cleanup order

Check the install method

Run which kimi, kimi --version, and your package manager list command. In VS Code, check installed extensions separately.

Remove the executable

Use the same package manager that installed it, such as npm uninstall -g, pnpm remove -g, yarn global remove, or the native uninstaller.

Sign out before deleting data

Use the Kimi Code logout path when available, then remove only the credential files you intend to clear.

Preserve sessions first

If the sessions contain work you may need later, export or copy the relevant session before clearing the data directory.

What can remain after uninstall

Do not start by deleting everything

A full data-root delete removes config, sessions, credentials, plugin records, logs, and local history. That is fine for a clean reset, but heavy-handed for a normal uninstall.

Plugins are separate state

A plugin removal can leave managed copies or original source files behind. If a plugin caused the problem, remove or disable it before uninstalling the whole CLI.

Credentials need care

Provider OAuth and MCP OAuth files live under the data root. Delete only what you intend to clear, especially on a shared development machine.

FAQ

Will uninstalling Kimi Code delete my sessions?

Not always. Package removal and data removal are separate. Sessions live under the Kimi Code data root.

How do I do a clean reinstall?

Uninstall the executable, move or remove the data root, install again, then sign in and configure providers from scratch.

Can I keep old sessions after uninstalling?

Yes. Export or keep the sessions directory before clearing local data.

Further reading