Hey @rinchen,
This is an issue we’re tracking, and you can bring it back down without losing any chats.
1. Delete the stale backup. state.vscdb.backup (5.2 GB) is a leftover that’s no longer updated. Fully quit Cursor (Cmd+Q), then delete just that one file from ~/Library/Application Support/Cursor/User/globalStorage. This won’t touch your chats.
2. Compact the main DB. Reopen Cursor, open the Command Palette (Cmd+Shift+P), and run GC Agent KV Blobs. It clears orphaned data and rewrites state.vscdb into a compact file while keeping your chats. On a 52 GB file it takes a while and temporarily needs free space roughly equal to the current size, so let it finish, then quit fully with Cmd+Q (a reload isn’t enough; the quit can look like a brief hang, don’t force it).
Heads up: on older databases the freed space isn’t always returned to the OS, so the on-disk size may not drop as much as expected even though the buildup is cleared. Let me know the before/after size and I’ll dig in if it barely moves.
@rinchen nice, 52gb down to 32gb is a solid drop, and that cleared the orphaned data. Thanks for reporting the numbers back.
The 32gb that’s left is mostly your actual chat history rather than orphans, so a second GC won’t shrink it further. If you want to reclaim more, run “Developer: Delete Old Chats…” from the Command Palette and pick an age cutoff (say 60 or 90 days), then run GC Agent KV Blobs once more and fully quit with Cmd+Q. Export any older chats you want to keep first via “Export Chat”, since Delete Old Chats permanently removes chats past the cutoff. The underlying growth is an issue we’re tracking.