Kimi Code data

Remove Kimi Code CLI and Local Credentials

A deeper Kimi Code removal guide for sessions, config files, OAuth credentials, plugin records, logs, and local history.

Local data folders and Kimi Code configuration map
Cleanupreading path
Kimi K3frontier example
8source links
2026-07-29updated

Keep what matters before you remove anything

Removing the Kimi Code binary stops new sessions from launching, but it may not remove configuration, history, plugins, or OAuth tokens. If the goal is a complete local cleanup, work from the documented data-root layout.

The default data root is under the user's home directory unless KIMI_CODE_HOME points elsewhere. Clear it in pieces when you only need to fix one part.

Copyable commands

A full removal is easier when you separate the executable, the data root, plugins, and credentials.

Print the data root and key folders

KIMI_CODE_HOME wins when it is set; otherwise Kimi Code uses the default home directory.

KIMI_CODE_HOME="${KIMI_CODE_HOME:-$HOME/.kimi-code}"
printf '%s\n' "$KIMI_CODE_HOME"
ls "$KIMI_CODE_HOME"
ls "$KIMI_CODE_HOME/credentials" 2>/dev/null || true
ls "$KIMI_CODE_HOME/plugins" 2>/dev/null || true

Archive before deeper cleanup

Export a session and validate config while the command still works.

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

Move selected data folders aside

Use this when only plugin records or logs are causing trouble.

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

Verify a fresh CLI state

After reinstalling, test config first and then run one tiny prompt.

kimi doctor
kimi -p "Reply only: KIMI_READY"

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.

Data cleanup map

Data typeWhere to lookUse when
Runtime configconfig.toml in the data rootProvider, model, or loop settings are wrong
Sessionssessions and session_index.jsonlYou need a full conversation reset
Provider OAuthcredentialsLogin state is wrong or should be removed
Plugin recordspluginsPlugin state is broken or unwanted

Safe cleanup order

Find the data root

Check KIMI_CODE_HOME first. If it is not set, use the default Kimi Code data directory documented for your operating system.

Export what matters

Use kimi export for sessions you may need to share or archive before deleting session folders.

Clear targeted folders

Reset config, sessions, logs, provider credentials, MCP credentials, plugin records, or user skills depending on the problem.

Test with a fresh start

After cleanup, install Kimi Code again and run a small command before restoring plugins or custom config.

What can remain after uninstall

Credential cleanup

Kimi Code keeps provider credentials and MCP credentials in separate locations. Clearing one does not necessarily clear the other.

Plugin cleanup

Removing plugin records resets installed state. Local plugin source directories are not automatically deleted, which is useful when you want to reinstall later.

Config reset

Deleting config.toml is enough for many provider or model mistakes. Deleting the whole data root is the last step, not the first one.

FAQ

Is deleting the data root required?

No. It is useful for a full reset, but targeted deletion is safer for most problems.

Does reinstalling Kimi Code replace old config?

Not necessarily. Existing config can survive package reinstall unless you clear the data root.

What should I save first?

Export important sessions and copy any config you may need to compare later.

Further reading