What is ~/Library/Caches/JetBrains, and is it safe to delete?

~/Library/Caches/JetBrains holds the indexes and caches that IntelliJ IDEA, PyCharm, WebStorm and other JetBrains IDEs build for your projects, and the IDE rebuilds them, so they are safe to clear.

Shiva ChandraMaker of Clean House · · 2 min read
Short answer

JetBrains IDEs keep indexes and caches here so code search and completion are fast. They rebuild when you reopen a project, which takes time. Use File, Invalidate Caches inside the IDE. Deleting the folder by hand is possible with the IDE closed, but local history may be lost, so Look first.

Path
~/Library/Caches/JetBrains (one subfolder per product and version, such as IntelliJIdea2025.1)
What it is
IDE indexes, caches and temporary data for your projects
Typical size
Often several gigabytes across products and old versions
Made by
JetBrains IDEs
Safe to delete?
Look first Safe to rebuild, but use Invalidate Caches and check local history.
Comes back?
Yes. The IDE re-indexes projects when you reopen them, which takes a while.

What is in the JetBrains caches folder?

Each IDE and version gets its own subfolder. Inside are the indexes the IDE builds so it can jump to definitions and search quickly, along with other cache data. JetBrains documents this location on macOS, and the logs sit separately in ~/Library/Logs/JetBrains.

Old versions of an IDE leave their folders behind after an update, which is a common source of wasted space.

Is it safe to delete it?

The indexes are rebuilt, so the data is safe to remove. The cost is time: the IDE has to re-index every project the next time you open it. Local History, which can let you recover older file versions, may also be stored in these folders. JetBrains' Invalidate Caches dialog keeps local history by default unless you tick the option to clear it.

How do I clear it?

  1. In the IDE, choose File, then Invalidate Caches.
  2. Choose the options you want and click Invalidate and Restart.
  3. For old IDE versions you no longer use, quit all JetBrains apps and move that version's folder from ~/Library/Caches/JetBrains to the Trash.
Just restart in that dialog deletes nothing. Choose Invalidate and Restart to clear caches.

How Clean House handles it

Clean House names the JetBrains IDE that made each cache folder and says whether it is still installed, so folders left by an uninstalled version are easy to spot. Caches that rebuild are marked accordingly, and anything moved goes to the Trash with an undo. It also recognizes developer tools in Dev Desk.

Questions

How do I clear JetBrains caches?

In the IDE, choose File, then Invalidate Caches, then Invalidate and Restart.

Can I delete old JetBrains version folders?

Yes, for versions you no longer use. Quit the IDEs first.

Will I lose settings if I delete the caches folder?

Settings live elsewhere, in Application Support. Local history stored with caches may be lost.

Sources

  1. JetBrains Support: Directories used by the IDE to store settings, caches, plugins and logs
  2. IntelliJ IDEA Help: Invalidate caches