{"slug": "vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a", "title": "VS Code and Cursor keep old copies of your extensions: where editors hide gigabytes on a Mac", "summary": "A developer documented how VS Code, Cursor, Windsurf and other VS Code forks on macOS accumulate gigabytes of stale extension copies and Electron caches that the editors never surface to users. Because updated extensions are installed alongside old versions and only removed on the next full restart, rarely-quit editors can retain large leftovers — on one Mac, four old copies of a single AI extension totaled 2.8 GB. The writeup explains how to inspect the `.obsolete` manifest and safely delete marked folders, Chromium/Electron caches, ShipIt update leftovers, and data from uninstalled editors.", "body_md": "If you use VS Code, Cursor, Windsurf or another VS Code fork on a Mac, a few gigabytes can build up in places the editor never shows you. Most of it is safe to clear, and some of it the editor would have cleared itself if it had restarted.\n\nWhen an extension updates, the editor installs the new version into a new folder next to the old one. It doesn't delete the old folder right away. It writes the old folder's name into a file called `.obsolete` in the extensions folder, and deletes everything listed there the next time it starts.\n\nThat works if you quit your editor often. If you leave it open for a week, or you have a second editor you rarely open, the old copies stay. AI extensions make this worse: they update often and many ship native binaries, so each copy can be hundreds of megabytes. On one Mac I looked at, four old copies of a single AI extension added up to 2.8 GB, all marked in `.obsolete` a week earlier and still on disk.\n\nEach editor keeps its extensions in its own folder:\n\n| Editor | Extensions folder | \n|---|---|\n| VS Code | `~/.vscode/extensions` | \n| VS Code Insiders | `~/.vscode-insiders/extensions` | \n| Cursor | `~/.cursor/extensions` | \n| Windsurf | `~/.windsurf/extensions` | \n| VSCodium | `~/.vscode-oss/extensions` | \n\nSee what's waiting to be deleted, and the biggest folders:\n\n```\ncat ~/.vscode/extensions/.obsolete\ndu -sh ~/.vscode/extensions/* | sort -h | tail -15\n```\n\n`.obsolete` is a small JSON object like `{\"publisher.extension-1.2.3\": true}`. Every key set to `true` is a folder the editor has already given up on.\n\nThe simplest fix is to quit the editor completely (Cmd-Q, not just closing windows) and open it again. It removes what's listed on its way up.\n\nIf you'd rather do it by hand, quit the editor first, then delete only the folders it marked. macOS 15 and later include `jq`:\n\n```\ncd ~/.vscode/extensions &&\njq -r 'to_entries[] | select(.value == true) | .key' .obsolete |\nwhile read -r d; do\n  case \"$d\" in \"\"|.*|*/*) continue ;; esac   # only plain folder names\n  [ -d \"$d\" ] && rm -rf -- \"$d\"\ndone\n```\n\nChange the folder for Cursor or another fork. Don't delete extension folders that aren't listed: those are the versions you're using.\n\nEach editor also keeps Chromium and Electron caches under `~/Library/Application Support/`, in a folder named after the app: `Code` for VS Code, `Code - Insiders`, `Cursor`, and so on. Inside it, these are caches the editor rebuilds as you work:\n\n`Cache`, `Code Cache` and `GPUCache`: the usual Chromium caches` CachedData`: compiled JavaScript for faster startup` CachedExtensionVSIXs`: downloaded extension packages` logs`: old log files\nWith the editor quit, you can delete those folders. The next launch is a little slower while it rebuilds them.\n\nLeave the rest of that folder alone. `User` holds your settings, keybindings and snippets, and `User/workspaceStorage` holds per-project state that some extensions rely on, such as chat history.\n\nVS Code and many Electron apps update through a helper called ShipIt, which downloads the new version into `~/Library/Caches/<app id>.ShipIt`, for example `~/Library/Caches/com.microsoft.VSCode.ShipIt`. Once the update is installed, what's left there is a leftover. If the editor isn't in the middle of updating, it's safe to delete. Slack, among others, does the same thing.\n\n```\ndu -sh ~/Library/Caches/*.ShipIt 2>/dev/null\n```\n\nDragging an editor to the Trash removes the app, not its data. If you tried Cursor, Windsurf or VS Code Insiders and moved on, check for their dot folders in your home folder and their folders in Application Support:\n\n```\ndu -sh ~/.cursor ~/.windsurf ~/.vscode-insiders ~/.vscode-oss 2>/dev/null\ndu -sh ~/Library/Application\\ Support/{Cursor,Windsurf,\"Code - Insiders\",VSCodium} 2>/dev/null\n```\n\nAnything there that belongs to an editor you no longer have installed can go, extensions and all. Keep the `User` folder if you think you might come back and want your settings.\n\nQuit and reopen your editors now and then so they clear their own old extensions, clear the caches with the editor closed, and check for leftovers from editors you stopped using.\n\nDisclosure: I make [Diskwise](https://diskwise.app/), a Mac menu bar app that finds these for you, including old extension copies that are marked in `.obsolete` while the editor is closed. It's a free scan to see what it finds. The commands above work without it. This post was written with Claude.", "url": "https://wpnews.pro/news/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a", "canonical_source": "https://dev.to/alicodesdev/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-gigabytes-on-a-mac-bld", "published_at": "2026-11-30 06:37:34+00:00", "updated_at": "2026-11-30 06:44:52.750925+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["VS Code", "Cursor", "Windsurf", "VSCodium", "Microsoft", "ShipIt", "Slack", "Electron"], "also_reported_by": [], "takeaway": "VS Code-family editors only delete superseded extension folders listed in `.obsolete` on a full restart, so quitting and reopening the editor reclaims space — on one Mac, four stale copies of a single AI extension accounted for 2.8 GB.", "recommendation": {"advice": "Fully quit (Cmd-Q) and reopen VS Code, Cursor or Windsurf periodically so the editor deletes folders marked in `.obsolete`; for manual cleanup, delete only the plain folder names listed there.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a", "markdown": "https://wpnews.pro/news/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a.md", "text": "https://wpnews.pro/news/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a.txt", "jsonld": "https://wpnews.pro/news/vs-code-and-cursor-keep-old-copies-of-your-extensions-where-editors-hide-on-a.jsonld"}}