JetBrains IDEs keep a cache folder per version, forever
Caches, indexes and logs live outside the app, in a folder per IDE per version. Where they are and which ones belong to versions you removed.
JetBrains IDEs keep their working data outside the application, in three folders named after the product and the version. Upgrading creates a new set. Uninstalling the IDE does not remove the old ones, and neither does anything else.
The three locations
du -sh ~/Library/Caches/JetBrains/* \
~/Library/Application\ Support/JetBrains/* \
~/Library/Logs/JetBrains/* 2>/dev/null | sort -h | tail -15| Location | Holds | Safe to remove |
|---|---|---|
Library/Caches/JetBrains | Indexes and compiler output caches | Yes, reindexed on next open |
Library/Application Support/JetBrains | Settings, plugins, licences | No, this is your configuration |
Library/Logs/JetBrains | Logs | Yes |
The Caches folder is where the size is. An index of a large project is easily several gigabytes, and each IDE version keeps its own.
Finding the versions you no longer run
The folder names carry the product and version, for example IntelliJIdea2024.1. Compare that list against what is actually installed:
ls ~/Library/Caches/JetBrains
ls /Applications | grep -iE 'intellij|pycharm|webstorm|goland|rider|clion|studio'Anything in the first list with no matching entry in the second is a cache for an IDE you have removed or a version you have upgraded past. Those are free to delete: there is no application left to be slowed down by rebuilding them.
Clearing caches for an IDE you still use
Use the IDE's own command, File, Invalidate Caches. It clears and rebuilds cleanly, and it is the supported route. Deleting the folder by hand while the IDE is running produces the same result plus a chance of a confused workspace.
Expect the first project open afterwards to be slow, because reindexing is exactly the work you just deleted. That is the entire cost.
On an Android machine, check the neighbours
Android Studio is a JetBrains IDE, so everything here applies to it, and it comes with much larger neighbours: emulator images and the SDK, and the Gradle folder that holds a full Gradle distribution per version. Those two are usually a multiple of the IDE caches.
Common questions
Where does IntelliJ store its caches on a Mac?
In ~/Library/Caches/JetBrains, with a folder per product and version. Settings and plugins live separately under ~/Library/Application Support/JetBrains, and logs under ~/Library/Logs/JetBrains.
Is it safe to delete JetBrains cache folders?
Yes for Caches and Logs. They hold indexes and diagnostic output that are rebuilt when you next open a project, at the cost of a slow first index. Application Support holds your configuration and should be left alone.
Why do I have caches for IDE versions I no longer have?
Because each version creates its own folder and uninstalling the IDE does not remove them. Comparing the folder names in Caches against what is in your Applications folder shows which belong to nothing.
What does Invalidate Caches do?
It clears the IDE's index and cache folders and rebuilds them on the next open. It is the supported way to do what deleting the folder does by hand, and it avoids leaving the IDE in an inconsistent state.