Repository navigation
Open
Labels
debtCode quality issuesfeature-requestRequest for new features or functionalityworkbench-os-integrationNative OS integration issues
Milestone
Description
Config is stored in ~/.config/Code[ - <quality>]/User. To match platform conventions (lowercase and hyphens for everything) as well as to keep consistency with the cli code[-<quality>] I propose we change the settings directory one of:
~/.config/code[-<quality>]/user~/.vscode[-<quality>](see Why are settings and keybindings not in the same directory as extensions? #3883)~/.code[-<quality>](to prevent using 'vs' showing up in the OSS build as it is now)
If we moved this it would probably require some discovery/migration on first launch of a newer version.
The below is a living document.
Proposed folder structure
Notes:
- I don't think we should be encouraging the use of admin rights within vscode, instead a permissions elevation dialog would probably be better than allowing a specific place for root user data Use specific user data directories when running as root #5561
- I want to clean up the whole
codevsvscodething in this change; only official builds should carry the visual studio branding, that should carry over to the config directories consistently as well. - The CLI args
--user-data-dirand--extensions-dirwill need to be adjusted for this, something like--config-dirand--cache-dirwould probably be better.
Windows
Old
Settings: %APPDATA%\Code[ - Variant]\User\settings.json
Keybindings: %APPDATA%\Code[ - Variant]\User\keybindings.json
Snippets: %APPDATA%\Code[ - Variant]\User\snippets\
Workspace storage: %APPDATA%\Code[ - Variant]\User\workspaceStorage\
Chromium user data: %APPDATA%\Code[ - Variant]\
Extensions: %USERPROFILE%\.vscode[-variant]\extensions\
New
Settings: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\settings.json
Keybindings: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\keybindings.json
Snippets: %APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\snippets\
Workspace storage: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\workspaceStorage\
Chromium user data: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\userdata\
Extensions: %LOCALAPPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\extensions\
Notes:
- Note that
%APPDATA%is roaming and%LOCALAPPDATA%is local, meaning extensions will not be carried across multiple machines until a solution is devised for Persist an extensions manifest file #15442. An extension manifest, eg.%APPDATA%\Microsoft\[Visual Studio ]Code[ - Variant]\extensions.jsonwhich automatically installs extensions is my thinking of solving this problem.
Linux
Old
Settings: $HOME/.config/Code[ - Variant]/User/settings.json
Keybindings: $HOME/.config/Code[ - Variant]/User/keybindings.json
Snippets: $HOME/.config/Code[ - Variant]/User/snippets/
Workspace storage: $HOME/.config/Code[ - Variant]/User/workspaceStorage/
Chromium user data: $HOME/.config/Code[ - Variant]/
Extensions: $HOME/.vscode[-variant]/extensions/ (not moving)
New
Settings: $XDG_CONFIG_HOME/[vs]code[-variant]/settings.json
Keybindings: $XDG_CONFIG_HOME/[vs]code[-variant]/keybindings.json
Snippets: $XDG_CONFIG_HOME/[vs]code[-variant]/snippets/
Workspace storage: $XDG_CACHE_HOME/[vs]code[-variant]/workspaceStorage/
Chromium user data: $XDG_CACHE_HOME/[vs]code[-variant]/userdata/
Extensions: $XDG_CACHE_HOME/[vs]code[-variant]/extensions/
Notes:
- Thanks to Oliver Middleton (@ollie27) and others for calling out the XDG Base Directory Specification, see that document for fallbacks to the environment variables.
$XDG_CACHE_HOMEwould be best for extensions provided there is an extensions manifest in$XDG_CONFIG_HOMEPersist an extensions manifest file #15442.- Maybe extensions should live in
$XDG_DATA_HOME?
Mac
Old
Settings: $HOME/Library/Application Support/Code[ - Variant]/User/settings.json
Keybindings: $HOME/Library/Application Support/Code[ - Variant]/User/keybindings.json
Snippets: $HOME/Library/Application Support/Code[ - Variant]/User/snippets/
Workspace storage: $HOME/Library/Application Support/Code[ - Variant]/User/workspaceStorage/
Chromium user data: $HOME/Library/Application Support/Code[ - Variant]/
Extensions: $HOME/.vscode[-variant]/extensions/ (not moving)
New
Settings: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/settings.json
Keybindings: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/keybindings.json
Snippets: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/snippets/
Workspace storage: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/workspaceStorage/
Chromium user data: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/userdata/
Extensions: $HOME/Library/Application Support/[Visual Studio ]Code[ - Variant]/extensions/
Notes:
- Is there a similar standard for dividing cache and config files on Mac? http://stackoverflow.com/a/5084892/1156119
Reacted by blakehawkins, Ben Creasy, Pine, Valentin Hăloiu, Giovanni Bassi, Sean Middleditch, Florian Hötzinger, Severen Redwood, Jerome Leclanche, hayley and 704 more
Reacted by Daniel Toubul, Michael MacDonald, Felix Stupp, Isaac Vicente, Alphyr, Rafael Silva, obiwan007, Pratikchhya, David Matthew, Max Xu and 30 more
Reacted by Melvin, Tomsgu, MrAn0nym, tobil4sk, Martin Bruset Solberg, jtrv, StarryMohannad :3, Isaac Vicente, Daniel Toubul, Michael MacDonald and 30 more
Reacted by Ict, DeerSpotter, Jean-Nicolas Lagneau, Lyle Hanson, MrAn0nym, tobil4sk, jtrv, Isaac Vicente, Maximilian Knespel, srestegosaurio and 26 more
Metadata
Metadata
Assignees
Labels
debtCode quality issuesfeature-requestRequest for new features or functionalityworkbench-os-integrationNative OS integration issues
Activity
[-]Code .config on Linux doesn't follow OS conventions[/-][+]Revisit VS Code folder structure for app data, settings, extensions[/+]bpasero commentedon Mar 9, 2016
I wonder if we should do this before GA. Besides the summary, I also do not like that we have 2 folders, one for application data and one for extensions. Ideally we have one folder for both.
Tyriar commentedon Mar 9, 2016
It was a little confusing when I was writing my script that automates my config to discover there were 2 config folders. If this is going to be done I vote for
~/.code[-<quality>]so that it matches the executable name.bpasero commentedon Mar 9, 2016
I am more worried about the migration than finding a name :)
felixfbecker commentedon Mar 10, 2016
I also don't get why there are two folders. Afaik
.vscodeonly includes one subfolder,extensions. Why not simply put settings in.vscodeaswell?I also like
.vscodemore than.code, Visual Studio stuff is also in.vsand it is less ambiguous.Tyriar commentedon Mar 11, 2016
While fiddling with the config directories it might be worth tackling a portable version at the same time #329
bpasero commentedon Mar 11, 2016
Not for GA.
bpasero commentedon Mar 13, 2016
Btw the largest chunk of stuff in app date is created by Chrome itself and is used for local storage, index db, etc. It would be easy to migrate and move our settings out of that folder, I am worried about migrating the rest...
233 remaining items
OJFord commentedon May 31, 2025
But note that technical users/developers who use macOS have a tendency to hate it when tools insist on using those directories even if XDG dirs are set in env vars explicitly.
Tronix117 commentedon Jul 9, 2025
Kind of agree with macias in #251883, I was managing home backup for my company users and didn't get why those .config directories were this big.
From around 3 sample users (developers), I got around the same results.
Here is an example :
and within :
So in
.config, Code is using 77% and chromium 24% of the total.Within Code :
From what I can see from those last digits, 95% of the space is used by folders having
cachein their name.For any cache that can be rebuilt at any time,
XDG_CACHE_HOME(usualy~/.cache) should be used instead.If those folders can not be rebuild from scratch, then those are not cached folders and are badly named.
It's kind of a concern for me from now, because I do not want to backup and use storage for cache that can is non essential to the user.
soymadip commentedon Aug 31, 2025
will FHS be implemented?
willmruzek commentedon Sep 15, 2025
I'm sorry if I'm missing something. The working spec doesn't address the concern/request to manage VS Code settings via dotfiles on MacOS.
$XDG_CONFIG_HOMEfor config would be ideal.I don't personally care about data/cache locations.
Is this a MacOS limitation?
Right now, I have a couple scripts to import/export settings, but it would be great if I could just update my dotfiles without import/export.
XhstormR commentedon Nov 21, 2025
As a Mac user, I'd like to be able to control the config file path and change it to
~/Library/Application Support/Code/User/settings.json->~/.config/Code/User/settings.jsongithub-account1111 commentedon Nov 21, 2025
Wouldn't it make more sense to do it the other way around? I think Visual Studio is the one that should move its default install location to the Microsoft folder, kind of like so:
https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VisualStudio
https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Microsoft/VisualStudioCode
Duplicating every program's developer's name creates unnecessary redundancy and clutters up Program Files folders.
Moving Cache (I assume that's referring to %APPDATA%\Code\Cache) to %LOCALAPPDATA% makes sense, but I think moving History (Timeline), workspaceStorage, globalStorage (Recents) would be problematic. Plus the three only take up 100 MB combined for me, and that's after years of usage.
trinitronx commentedon Nov 21, 2025
Indeed, this is also a valid concern on any Unix OS (e.g. Linux, *BSD, *nix).
Also relevant to dotfiles managers:
Currently there is also a related issue where YAML schema configs are rewritten using static paths, which would need to be solved to avoid VSCode making file changes on it's own accord (outside of a dotfiles manager). One example is atlassian/atlascode#155 but this may also affect other
yaml.schemassettings and extensions that use this.Expand for
yaml.schemasdotfile rewrite exampleWhen opening & using VSCode, the
yaml.schemasconfig file setting insettings.jsonis rewritten using an absolute path, which will of course be different across different machines & OS. Therefore, the${userHome}variable should NOT be expanded and rewritten back to thesettings.jsonconfig..config/Code/User/settings.json:SinMayFly commentedon Nov 22, 2025
That's exactly what I'm thinking too
XhstormR commentedon Dec 8, 2025
Can we achieve this by using the
ln -scommand to soft link the folder?Lannakin commentedon Dec 29, 2025
Sure! But this does not solve the issue of it unnecessarily adding more clutter to $HOME.
feat: extract UserQuestionHandler service for handling user input que…
AnrDaemon commentedon Apr 28, 2026
To add to the pile of crap that is the current VSCode profile directory, it needs a separation into disposable "cache" directory and important "user profile" directory. An I mean clear separation, where I can tell backup tools "don't archive the entirety this directory" and it "do the right thing".
levonk commentedon Aug 10, 2026
For anyone following this umbrella issue specifically for the
~/.vscode-shared/path introduced in PR #311317 (April 2026): I've opened a focused sub-issue at #330061 requesting$XDG_STATE_HOMEfor that specific path.Why a separate issue:
APPLICATION_SHAREDstorage by 10 years and doesn't cover~/.vscode-shared/sharedStorage/state.vscdbin its body$XDG_STATE_HOME(per XDG spec v0.8) — it's restart-persisting state (recently-opened paths, trust markers), not config or dataenvironmentService.ts) and can be landed independently of the broader Revisit VS Code folder structure for app data, settings, extensions #3884 scopeThis isn't meant to fragment the XDG compliance effort — #3884 remains the umbrella. But a focused issue for a specific new path is more actionable than a 10-year-old thread with 222 comments.
btardif commentedon Aug 26, 2026
On Windows, the remaining profile-root paths are
%USERPROFILE%\.vscodeand%USERPROFILE%\.vscode-shared.--extensions-dircan relocate extensions only when every launch path uses the flag, whileargv.jsonremains in.vscode. The newer shared database has an undocumented--shared-data-dirflag but no persistent environment override. This affects Start Menu launches, file associations, Git, and other integrations that do not consistently carry custom CLI flags.A supported Windows path policy or documented persistent overrides for the extensions,
argv.json, and application-shared state would allow these directories to move under platform-appropriate AppData locations without relying on junctions or modified shortcuts.