How to delete Cursor chat history, and what you lose

the chats are rows in a SQLite database the IDE also uses for everything else

Cursor does not keep one file per conversation. The IDE stores chats as rows in state.vscdb, a SQLite database that also holds the rest of its state, and the CLI writes transcripts as ordinary files somewhere else entirely. Which one you are trying to delete decides what you can safely do.

Before you wipe chats to free space: Cursor keeps no archive once a chat row is deleted from state.vscdb. Index them first with deja-vu: it reads both state.vscdb and the CLI transcripts locally, so past fixes stay searchable from Cursor, Claude Code or Codex after the database is gone.
$brew install deja-vu && deja index
$npx @vshulcz/deja-vu index
deja-vu on GitHubOther ways to install →

Where the chats are

The user directory is ~/Library/Application Support/Cursor/User on macOS and ~/.config/Cursor/User elsewhere, with state.vscdb under globalStorage/ and under each workspaceStorage/<id>/. Inside it, the cursorDiskKV table holds one value per chat at composerData:<id> and one per message at bubbleId:<chat-id>:<bubble-id>. Cursor CLI is the simple case: ~/.cursor/projects/<encoded-path>/agent-transcripts/**/*.jsonl, one file per transcript.

# the IDE store
ls -lh ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb

# what is in it, if sqlite3 is installed
sqlite3 ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb \
  "select count(*) from cursorDiskKV where key like 'composerData:%'"

# the CLI transcripts, which are plain files
ls -t ~/.cursor/projects/*/agent-transcripts/**/*.jsonl | head

How to delete it

Delete a chat from the Cursor UI. That is not a hedge — the database is live state the IDE owns, and editing it underneath a running editor is how people lose window layouts and extension settings along with the chat they meant to remove.

If you want the history gone from disk rather than from the list, close Cursor first, and know what you are removing:

# chats and every other bit of state in this database
rm ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb

# one workspace's chats and that workspace's state
rm -rf ~/Library/Application\ Support/Cursor/User/workspaceStorage/<id>

# CLI transcripts only, which are nothing but transcripts
rm -rf ~/.cursor/projects/<encoded-path>/agent-transcripts

There is no archive to restore from. The format registry documents both stores field by field, including the bubble types and the millisecond timestamps.

If the reason is size, a database of tens of gigabytes, find what fills it before deleting all of it.

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. This supports CLI chats only and also removes their matching chats/<hash>/<id> directory. deja refuses IDE chats in the shared state.vscdb; delete those through Cursor. 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.

What you lose

The chats are the record of what you worked out and what the agent ran. Cursor's own search over them goes with the rows, and so does any future search: a question you answered in March is answerable only while the history of March exists somewhere.

deja reads both stores — the IDE database through sqlite3 and the CLI transcripts directly — along with every other agent's history on the machine, so what you settled in Cursor comes back in Claude Code or Codex. Sessions already in its index stay searchable after you delete the originals through Cursor or by hand, and in the screen bare deja opens, o carries one into another agent. A CLI transcript removed by hand is listed under the screen's Deleted tab; deja does not write a chat back into either Cursor store.

Where every agent stores history · The same question for Claude Code · Giving Cursor recall over the rest

Found this useful? Star deja-vu on GitHub.