Why is Cursor's state.vscdb so big on my Mac?

One file in my code editor was 7.8 GB. Bigger than a lot of people's whole photo library. Here's what was in it.

Shiva ChandraMaker of Clean House · · 2 min read
Short answer

state.vscdb is the database where Cursor keeps its app-wide state, including your AI chat and agent history. Mine was 7.8 GB: about 3.8 GB of chat messages and 3 GB of agent data. Don't delete the file. Clear old chats in Cursor, quit it, then compact the file.

Path
~/Library/Application Support/Cursor/User/globalStorage/state.vscdb
What it is
Cursor's state database, including chat and agent history
Size on my Mac
7.8 GB (measured 25 November 2026)
Made by
Cursor
Safe to delete?
Keep; trim from inside Cursor
Comes back?
The file does, empty. Your chat history doesn't

What was taking the space

I opened my copy read-only to see what was in it. Grouped by type:

DataSizeWhat it is
bubbleId:about 3.8 GBIndividual chat messages
agentKv:blob:about 3 GBAgent data, like file contents and tool output
composer.contentabout 270 MBComposer content
checkpointId:about 230 MBCheckpoints you can roll an agent back to

So it's not junk. It's every conversation I've had with the AI in that editor.

Why you shouldn't just delete it

Cursor makes a fresh empty file if this one disappears, so the app still opens. But every past chat is gone, along with whatever else it was keeping there. If you really want a clean slate, quit Cursor and move the file to the Trash so you can change your mind.

How to shrink it properly

  1. Check the size: du -sh ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb
  2. In Cursor, delete the chats and agent runs you don't need.
  3. Quit Cursor, then compact the file: sqlite3 ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb "VACUUM;"
Make a copy of the file before running VACUUM, and never run it with Cursor open. Mine had no free space inside, so VACUUM only helps after you've deleted chats.

What Clean House does with it

Clean House shows this as Cursor's chat history instead of a random database, marks it Keep, and tells you to clear chats in Cursor rather than deleting the file.

Clean House review screen where each item says whether it rebuilds, downloads again or never comes back
Before anything moves, each item says whether it comes back.

Questions

What is state.vscdb in Cursor?

A database Cursor inherited from VS Code for app-wide state. Cursor also keeps your AI chats and agent runs in it, which is how mine got to 7.8 GB.

Can I delete Cursor's state.vscdb?

You can, but you lose your chat history and Cursor's saved state. Delete old chats inside Cursor instead, then compact the file.

Will VACUUM shrink state.vscdb?

Only after you've deleted chats. Mine had zero free space inside, so VACUUM on its own would have done nothing.