How to delete Cherry Studio session history, and what you lose
three transcript trees under Data/Agents, and deja delete refuses the id
Cherry Studio runs Claude Code, pi and dsh from a desktop app and writes each runtime's transcripts under its own app data. They are ordinary files, so removing a session is removing its file. deja delete does not take a Cherry Studio id: the command erases a session only for agents whose on-disk layout it has checked, and Cherry Studio is not one of them.
brew install deja-vu && deja indexnpx @vshulcz/deja-vu indexWhere the sessions are
The app data directory, and Data/Agents inside it, depends on the OS:
macOS ~/Library/Application Support/CherryStudio/Data/Agents
Linux ${XDG_CONFIG_HOME:-~/.config}/CherryStudio/Data/Agents
Windows %APPDATA%\CherryStudio\Data\Agents
On Linux that is ~/.config/CherryStudio when XDG_CONFIG_HOME is unset. Three agent stores sit under Data/Agents:
Data/Agents/.claude/projects/<workspace>/<session>.jsonl Data/Agents/.pi/sessions/<timestamp>_<id>.jsonl Data/Agents/.dsh/sessions/<workspace>/session-<id>/
The Claude tree is one JSONL per session. The workspace directory is the project path with its separators folded, the same names Claude Code uses under projects/. pi writes one flat JSONL per session, named with a timestamp and the session id, straight into .pi/sessions. dsh runs with DSH_HOME set to Data/Agents/.dsh, and each session is a directory session-<id> holding session.jsonl or a later session.vN.jsonl, optionally zstd-compressed. Removing that directory removes every generation of the log.
Installs from before the upgrade that added Data/Agents keep the Claude transcripts directly under the app data directory, at CherryStudio/.claude/projects/<workspace>/<session>.jsonl. Both trees can be present, and both hold sessions.
A data directory moved in the app's settings is recorded in ~/.cherrystudio/boot-config.json, under app.user_data_path, a map from the executable to the directory. Each absolute path in that map is another app-data root, with the same Data/Agents layout inside it, and a move can leave the default directory behind. If that relocated path is your home directory, ~/.claude/projects there is Claude Code's own store. Clear Cherry Studio's Data/Agents tree and leave Claude Code's alone.
# macOS: what is actually on disk ls -t ~/Library/Application\ Support/CherryStudio/Data/Agents/.claude/projects/*/*.jsonl ls -t ~/Library/Application\ Support/CherryStudio/Data/Agents/.pi/sessions/*.jsonl ls -d ~/Library/Application\ Support/CherryStudio/Data/Agents/.dsh/sessions/*/session-* # a moved data root, when the app recorded one jq -r '.["app.user_data_path"] | to_entries[] | .value' ~/.cherrystudio/boot-config.json
Index it before you delete it
Close nothing yet. With deja installed, index the stores while the files are still there:
deja index
deja reads the Claude JSONL (current and legacy), the pi logs and the dsh logs, files them as Cherry Studio, and follows every directory named in boot-config.json. A session already in the index stays searchable with deja show and under the Deleted tab of bare deja after you remove the file. deja does not write a transcript back into Cherry Studio.
DEJA_CHERRYSTUDIO_ROOTS replaces that whole list, the pi and dsh stores included. Point it at a backup by naming every root you want read — the .claude/projects directory and the .pi/sessions and .dsh/sessions directories — and run deja index against the copy.
How to delete one session
Close Cherry Studio first, so a running agent cannot append to the file you are about to remove. Then delete that session's own path. On macOS:
base="$HOME/Library/Application Support/CherryStudio" # one Claude session rm "$base/Data/Agents/.claude/projects/<workspace>/<session>.jsonl" # the same session on an install that predates Data/Agents rm "$base/.claude/projects/<workspace>/<session>.jsonl" # one pi session: the file name carries the id rm "$base/Data/Agents/.pi/sessions/<timestamp>_<id>.jsonl" # one dsh session, every log generation in the directory rm -r "$base/Data/Agents/.dsh/sessions/<workspace>/session-<id>"
On Linux, base is ${XDG_CONFIG_HOME:-$HOME/.config}/CherryStudio. On Windows the same three trees sit under %APPDATA%\CherryStudio. When boot-config.json names a moved directory, repeat the removal under that path as well: the app reads the moved store, and the default directory can still hold the older copy.
deja delete <id> refuses the session. The message is that Cherry Studio sessions can't be deleted yet, because deja has not checked how Cherry Studio lists them. The files above are the removal. deja forget --session <id> drops deja's own copy when you want the session gone from the index too, and leaves a tombstone so the next scan does not bring it back.
How to delete all of it
With Cherry Studio closed, removing the three session trees clears every transcript and leaves the app's settings in place. On macOS:
base="$HOME/Library/Application Support/CherryStudio"
rm -r "$base/Data/Agents/.claude/projects" \
"$base/Data/Agents/.pi/sessions" \
"$base/Data/Agents/.dsh/sessions" \
"$base/.claude/projects"
The last path is the pre-upgrade store; a machine that never had it has nothing there to remove. Data/Agents/.claude/settings.json is the Claude config directory the app gives its agents, which is where deja install cherrystudio-auto writes hooks, and Data/cherrystudio.sqlite is the app database that holds its MCP servers. Both sit beside the session trees, and this removal leaves them. Linux and Windows use the base from above. Do the same inside each directory app.user_data_path names.
What you lose
The prompts, the replies, and the tool calls of every session whose file you removed. Cherry Studio can no longer reopen them, and there is no archive directory to restore from. What deja index stored before the removal is the copy that remains searchable.
Keeping it searchable instead
deja reads those three stores — along with the other forty-two agents' histories on the machine — into one local index, searchable from the shell and from Cherry Studio once the MCP server is imported:
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja index deja "cherry studio session about the migration"
Indexing and search stay local, credentials are stripped as the index is built, and deja forget --session <id> removes a session from the index when you do want it gone. A transcript you deleted after indexing stays readable with deja show and under the Deleted tab of bare deja.
Where every agent keeps its history · Memory for Cherry Studio · The Cherry Studio format
Found this useful? Star deja-vu on GitHub.