What is ~/Library/Caches/JetBrains? Safe to delete?
Yes, ~/Library/Caches/JetBrains is safe to delete. It holds indexes and caches that JetBrains IDEs rebuild from your projects. The cost is time: each project is indexed again the next time you open it.
Where it is
~/Library/Caches/JetBrainsWhat it is
IntelliJ IDEA, PyCharm, WebStorm, GoLand and the other JetBrains IDEs index your code so that search, navigation and completion are instant. Those indexes, along with other caches, are stored in ~/Library/Caches/JetBrains.
Each product and each major version gets its own folder, named after both, such as a folder for one year's IntelliJ IDEA release and another for the next. When you upgrade, the old version's folder is not always removed.
Your settings and plugins are not here. They are in ~/Library/Application Support/JetBrains, and your projects are wherever you saved them.
How big it gets
Often several GB, and more if you have used several IDEs or kept folders from old versions.
How to clear it by hand
- Run the command below to see the size of each product and version folder.
- Quit the JetBrains IDEs you have open.
- Move the folders for versions you no longer have installed to the Trash. These are pure leftovers.
- For an IDE you still use, you can instead choose File, then Invalidate Caches from inside it, which clears and rebuilds the caches for that IDE.
- Recent IDE versions also offer Help, then Delete Leftover IDE Directories, which removes folders of old versions for you.
du -sh ~/Library/Caches/JetBrains/*What happens afterwards
The next time you open a project, the IDE indexes it from scratch. Search and completion are limited until that finishes, which can take several minutes on a large project. Settings, plugins and code are untouched.
How Diskzy handles it
Diskzy's Clean up tab finds caches, and the disk map shows the size of each JetBrains version folder so old ones are easy to spot. What it removes goes to the Trash.
Related guides
- Gradle caches~/.gradle/caches
- VS Code extensions~/.vscode/extensions
- Caches~/Library/Caches
- Android SDK~/Library/Android/sdk
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