What is ~/.vscode/extensions? Is it safe to delete?
You can delete ~/.vscode/extensions, but it removes every extension you have installed in Visual Studio Code. It is better to uninstall the ones you do not use from inside VS Code and leave the folder in place.
Where it is
~/.vscode/extensionsWhat it is
Visual Studio Code installs each extension into its own folder under ~/.vscode/extensions, named after the publisher, the extension and its version. The folder is hidden in Finder because its parent starts with a dot.
Language extensions are the big ones. Many ship their own language servers, compilers or runtimes, which is far more than a few scripts.
The folder grows as you add extensions. When an extension updates, the old version's folder can stay until VS Code is restarted and cleans it up.
How big it gets
From a few hundred MB to several GB, depending on how many language and tool extensions you have installed.
How to clear it by hand
- Run the command below to list your installed extensions.
- In VS Code, open the Extensions view with Shift, Command and X, find the ones you no longer use and click Uninstall.
- From Terminal you can do the same with code --uninstall-extension followed by the extension's identifier from the list.
- Restart VS Code so it removes folders of uninstalled and outdated versions.
- If you delete the whole folder instead, quit VS Code first. Extension settings stay in your settings file, but the extensions themselves must be installed again.
code --list-extensionsWhat happens afterwards
Uninstalled extensions stop working at once: their language support, themes or commands disappear. If you use Settings Sync, VS Code can install your synced extensions again on its own, which also means the folder may fill back up.
How Diskzy handles it
Diskzy shows ~/.vscode and the size of each extension folder on the disk map, so you can see which extensions take the most space before you uninstall them in VS Code.
Related guides
- JetBrains caches~/Library/Caches/JetBrains
- node_modules<project>/node_modules
- Application Support~/Library/Application Support
See where your Mac's space went
Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.
Try Diskzy for free