Separate configuration, cache, and extension data directories according to XDG standards
Currently, VS Code stores not only user configuration, but also cache, logs, extension data, and other temporary files in the .config/Code directory (on Linux). This leads to a situation where the configuration directory can grow to several gigabytes in size. For example, on my machine, the .config/Code folder currently takes up 1.6 GB, which is unexpected for a configuration directory.
This is a significant pain point for users, because:
- It complicates backup and migration of user settings (users expect to back up only configuration, not all cache and extension data).
- It makes it hard to manage disk space, since cache and logs are mixed with important settings.
- It does not follow the XDG Base Directory Specification, which recommends separating configuration (~/.config), cache (~/.cache), and data (~/.local/share) directories.
Proposal: Please consider splitting the storage of configuration, cache, and extension data according to the XDG Base Directory Specification:
- Store user settings and configuration in ~/.config/Code
- Store cache and temporary files in ~/.cache/Code
- Store extension data and other application data in ~/.local/share/Code
This would greatly improve the user experience, make disk usage more predictable, and align VS Code with standard Linux practices. Many popular applications already follow this approach.
Thank you for considering this feature. I believe it will benefit a large number of users who care about clean and manageable configuration directories.
See also #126182
/duplicate https://github.com/microsoft/vscode/issues/3884
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!