How to delete Cline task history, and what you lose
Cline has two separate stores; remove the conversation file, not the task's other state
Cline's modern CLI and its older VS Code extension do not share a history store. Check which one you used before deleting anything. The CLI keeps message JSON and a session manifest together; the extension keeps conversation history inside a task directory that may contain other task state.
Where the sessions are
The modern CLI/SDK store follows these variables in order; the first one set wins:
${CLINE_SESSION_DATA_DIR:-${CLINE_DATA_DIR:-${CLINE_DIR:-~/.cline}/data}/sessions}/<sessionId>/
<sessionId>.messages.json
<sessionId>.json
The legacy VS Code extension uses a different tree:
<host globalStorage>/saoudrizwan.claude-dev/tasks/<taskId>/ api_conversation_history.json state/taskHistory.json
Each VS Code-family host has its own globalStorage (Code, Code - Insiders, VSCodium, Cursor or Windsurf), so check the host where the task ran. The extension's task directory also holds more than the conversation.
How to delete one conversation
First close Cline and the editor so the active session cannot rewrite its files. For the CLI, remove the session's directory, which contains both the messages and the manifest:
rm -r "${CLINE_SESSION_DATA_DIR:-${CLINE_DATA_DIR:-${CLINE_DIR:-$HOME/.cline}/data}/sessions}/<sessionId>"
For the extension, remove only api_conversation_history.json from the task directory. Keep the rest of that directory if you want its title, workspace and task state:
rm "<host globalStorage>/saoudrizwan.claude-dev/tasks/<taskId>/api_conversation_history.json"
To clear all history for one store, remove its entire sessions directory (CLI) or the extension's tasks directory. This also removes every session or task in that store. The two stores are independent: clearing one does not clear the other.
What you lose
The conversation is the record of what Cline tried, the tools it used and the reasoning around the task. Removing the CLI session directory also removes its manifest; removing the extension's history file leaves the task directory's other state behind. Deleted conversations cannot be recovered from Cline unless you have a separate backup.
Keeping it searchable instead
deja reads both Cline formats, alongside the other agents' histories, into one local index:
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja "Cline task 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.
Where every agent keeps its history · Memory for Cline · The Cline format
Found this useful? Star deja-vu on GitHub.