How to delete Junie session history, and what you lose

Each session is a directory under ~/.junie/sessions; remove the session directory, and understand what remains in index.jsonl

JetBrains' Junie (the CLI, and the agent inside AI Assistant) keeps one directory per session. Inside, the conversation, the last state, and human-readable transcripts are stored across separate files. Deleting individual files leaves orphaned records behind, so removing the entire session directory is the clean approach.

Where the sessions are

${JUNIE_HOME:-~/.junie}/sessions/<session-id>/
  events.jsonl
  state.json
  transcript.md
  task-*/

events.jsonl is the event log recording user prompts and agent blocks. state.json holds the agent's last state, and transcript.md is a rendered second copy of the conversation. Each task also has a task-* directory. Beside the session directories, sessions/index.jsonl lists every session with its projectDir and taskName.

The home directory defaults to .junie under the JVM's user.home, not $HOME, which matters on a machine where the two differ. Setting JUNIE_HOME moves the whole store.

How to delete one session

Close Junie and any IDE instance running AI Assistant so an active session cannot rewrite its files, then delete the session directory:

rm -rf "${JUNIE_HOME:-$HOME/.junie}/sessions/<session-id>"

Removing the directory deletes the conversation log, the state, and the rendered transcript.md. Removing the directory leaves the session's line in sessions/index.jsonl; this index line holds only the path and task name, not the conversation contents.

To clear every session, remove the sessions directory. That removes every session across all projects; other configuration files under ~/.junie are not touched:

rm -rf "${JUNIE_HOME:-$HOME/.junie}/sessions"

What you lose

The conversation turns, the tool calls (commands, file inspections, and edits), the agent's task state, and the rendered transcript.md. Once deleted, Junie cannot restore the session, and junie --session-id <id> --resume will no longer find it unless you have a separate backup.

Keeping it searchable instead

deja reads Junie sessions, alongside other coding agents' histories, into one local index:

curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh
deja "Junie session about the refactor"

Indexing and search stay local, credentials are stripped, and deja forget removes a session from the index when you do want it gone. deja reads JUNIE_HOME too; DEJA_JUNIE_ROOT overrides it for deja's reads only, so set it to point deja at a copy or a backup of the sessions directory.

Where every agent keeps its history · Deleting Kimi Code history · The Junie format registry

Found this useful? Star deja-vu on GitHub.