How to delete DeepSeek Harness (dsh) session history, and what you lose

Each session is a directory holding a compressed log; remove the whole directory

dsh keeps one directory per session, and the conversation is a zstd-compressed JSONL log inside it. Delete the directory, not just the log.

Where the sessions are

${DSH_HOME:-~/.dsh}/sessions/<workspace-slug>/session-<uuid>/
  session.v4.jsonl.zstd

Older dsh builds wrote session.v3.jsonl.zstd. When dsh opens an older session it writes the history into a new-generation file and leaves the old one beside it, so one session directory can hold several logs. Setting DSH_HOME moves the whole tree. <workspace-slug> groups sessions by the workspace they ran in.

Cherry Studio embeds its own dsh store under <app data>/CherryStudio/Data/Agents/.dsh, with the same layout.

How to delete one session

Close dsh first so a running session cannot rewrite its files, then remove the session's directory:

rm -r "${DSH_HOME:-$HOME/.dsh}/sessions/<workspace-slug>/session-<uuid>"

Remove the whole directory so no older-generation log is left beside the new one.

To clear everything, remove the sessions directory. That removes every session of every workspace; the rest of ${DSH_HOME:-~/.dsh}, such as plugins and configuration, is not touched.

Delete one session with deja

If deja is installed, run deja last and copy the session id. Preview the deletion, then run it from a terminal and confirm:

deja delete <id> --dry-run
deja delete <id>

The dry run lists the paths without removing them. After confirmation, deja removes those paths and forgets its own copy of the session. This cannot be undone. It removes the whole session-<uuid> directory, including older-generation logs. deja refuses deletion if a file or directory to be removed was written in the last 5 minutes; end the session and wait before deleting it. deja still indexes Cherry Studio's embedded .dsh sessions under the cherrystudio harness, but deja delete does not support that harness, so delete them by hand as above. See Delete Cherry Studio session history.

What you lose

The conversation, the tool calls and results, and the directory that identifies the session. dsh cannot bring a deleted session back unless you have a separate backup.

Keeping it searchable instead

deja reads dsh sessions, alongside the other agents' histories, into one local index:

curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh
deja "dsh 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 DSH_HOME too; DEJA_DEEPSEEK_ROOT overrides it for deja's reads only, so set it to point deja at a copy or a backup of the tree.

Where every agent keeps its history · Memory for dsh · The dsh format

Found this useful? Star deja-vu on GitHub.