Neovim's plugins are small. The language servers Mason installs for them are not
Mason downloads language servers, formatters and debuggers into your Neovim data folder, some of them hundreds of MB. Where they are and how to prune.
A Neovim config pulls in plugins, which are small, and through Mason, language servers and tools, which are not. A Java or C# language server alone can be hundreds of MB. Many people installed a dozen while trying a distribution.
du -sh ~/.local/share/nvim ~/.local/state/nvim ~/.cache/nvim 2>/dev/null
du -sh ~/.local/share/nvim/mason/packages/* 2>/dev/null | sort -h | tailClean up
- In Neovim,
:Masonlists installed tools. PressXon one to uninstall it. :Lazy cleanremoves plugins no longer in your config, if you use lazy.nvim.~/.local/state/nvimholds logs, undo history and swap files. Thelogfiles can be deleted.~/.cache/nvimis safe to clear.
If you tried several Neovim distributions, each may have its own data folder named after its NVIM_APPNAME, like ~/.local/share/lazyvim. Remove the ones you do not use.
ls -d ~/.local/share/*vim* ~/.config/*vim* 2>/dev/nullOther editors: VS Code, JetBrains caches.
Related: LuaRocks trees.
Common questions
Where does Mason install language servers?
In ~/.local/share/nvim/mason, with one folder per package.
How do I remove Mason packages?
Open :Mason in Neovim and press X on a package to uninstall it.
Can I delete ~/.cache/nvim?
Yes. It holds caches that Neovim and plugins rebuild.