Skip to cookie settings

JetBrains IDE caches and old versions: what to delete

JetBrains IDEs keep data for each version you installed. Here are the folders to check and what each costs to recreate.

Part of: Mac disk cleanup for developers: every cache, what it costs to rebuild (Developers)

JetBrains IDEs such as IntelliJ IDEA, PyCharm and WebStorm keep their data in three places under your Library folder, with a separate subfolder for each IDE and version. Old versions leave their folders behind. Logs are disposable, but the system/cache folders also contain Local History. Preserve any work you need from that history before removing a folder; settings and plugins also need checking.

An IDE is an editor with built-in tools for building and debugging code. Each time you update a JetBrains IDE to a new major version, it can create new folders and leave the old ones.

The three places

  • ~/Library/Caches/JetBrains: the system directory, containing caches, indexes and Local History, one subfolder per IDE and version.
  • ~/Library/Application Support/JetBrains: settings, installed plugins and some local data. This is not only a cache.
  • ~/Library/Logs/JetBrains: log files.

See which exist and how big they are:

du -sh ~/Library/Caches/JetBrains ~/Library/Application\ Support/JetBrains ~/Library/Logs/JetBrains
du -sh ~/Library/Application\ Support/JetBrains/* | sort -h

On the Mac used to check this article, the Application Support folder was about two gigabytes and the logs folder about a hundred megabytes, and a Caches folder for JetBrains did not exist. The largest item in Application Support was a Daemon folder. Names and layout depend on which IDE and installer you use, so look at yours before you decide.

Safe, risky, never

  • Safe: logs you no longer need. For cache rebuilding, use Invalidate Caches with the optional Local History deletion unchecked. Re-indexing can take minutes on large projects.
  • Risky: manually removing a system/cache folder, including an old version folder, deletes its Local History. That may be the only recovery copy of uncommitted or deleted work. Application Support holds settings and plugins; removing it can reset your IDE configuration.
  • Never: do not delete a project’s .idea folder to free space unless you know what is in it. It holds project settings that your team may share through version control. It is small anyway.

Old versions

When you update from one major version to another, the new version creates its own subfolders, such as one named after the product and year. The old folders stay. Even after you remove the old IDE, its folders can hold settings you want to import and Local History you need to recover.

Before deleting an old settings folder, open the new IDE and check that your settings, key bindings and plugins are what you expect. If not, import from the old one first.

Invalidate caches from inside the IDE

Use the IDE’s Invalidate Caches action to rebuild caches. When you need history, leave the optional “Clear file system cache and Local History” choice unchecked: selecting it also deletes Local History. See Invalidate caches for the steps.

JetBrains documents the cache and history location in Directories used by the IDE and the recovery feature in Local History.

What the next start costs

After you clear caches, the IDE rebuilds its indexes for every project you open. That takes time, and your laptop will run warm. Code completion is limited until indexing finishes. It does not change your code.

If your IDE builds with Gradle, that has its own cache in ~/.gradle. See how to clear the Gradle cache. Android Studio is built on a JetBrains IDE and follows a similar pattern; see Android Studio disk use.

How to clear them

  1. Quit every JetBrains IDE.
  2. Run the du commands above and find old version folders and large items.
  3. Remove unneeded logs first. Before removing any old version folder, recover needed Local History and import needed settings. Manually deleting the system/cache directory discards its history; for cache rebuilding, prefer Invalidate Caches with Local History deletion unchecked.
  4. Move them to the Trash in Finder and empty it. See why the Trash does not free space.
  5. Start the IDE you use and check that your settings and projects are intact.

For editors outside JetBrains, see Cursor and VS Code storage. For other app data, see app leftovers. The overall map is in the developer cleanup guide.

Worked example: spot an old version

List the version folders under Application Support:

ls ~/Library/Application\ Support/JetBrains

On the Mac used to check this article, it showed Idea, IntelliJIdea2026.2, Daemon and a few small support folders such as bl, crl and consentOptions. Folders named after a product and a version are tied to one IDE release. If you see several for the same product, the older ones are what this article calls old versions.

Do not guess from the name alone. A folder with a version number can still be the one your IDE uses today. Open the IDE and check its version in the About window. Keep the folder that matches it.

Two kinds of “clear”

People say “clear the cache” for two different actions. One is Invalidate Caches inside the IDE. It rebuilds indexes and can keep your Local History if you leave that option unchecked. The other is deleting folders in Finder, which has no such choice. For ordinary slowness or odd code completion, the first is the better tool and costs only indexing time.

If something goes wrong

  • The IDE shows no recent projects after you delete a folder. You removed settings. Open your project from the Welcome screen and set up the IDE again, or import from a backup.
  • A plugin is missing. Plugins live under Application Support. Reinstall it from the IDE’s plugin settings.
  • You need an old edit that is not in Git. Local History was in the folder you removed. Check the Trash before you empty it.
  • Indexing never ends. Quit the IDE, start it again and give it time. Close other heavy apps while it runs.

When not to clean

Do not remove an old version’s folder until the new IDE has run for a while and you are happy with it. Keep it as a fallback. If the folders are small, the saving is not worth the risk.

See sizes in a scan

DiskJoy is our product. Its scan reads your disk and shows how large these folders are, read-only. Cleanup is not built yet, so DiskJoy does not delete IDE data today.

Frequently asked questions

Where are JetBrains caches on a Mac?

JetBrains IDEs keep caches in a JetBrains folder inside the user Library Caches folder, settings and plugins in a JetBrains folder inside Application Support, and logs in a JetBrains folder inside the user Library Logs folder. Each IDE and version has its own subfolder.

How do I delete old IntelliJ versions on Mac?

Before removing old version subfolders, recover any work you need from Local History and import any settings you want to keep. Quit the IDE and remove only folders you have checked. Deleting a system/cache directory also deletes that version of Local History.

Is it safe to clear the JetBrains caches?

Use Invalidate Caches and leave Clear file system cache and Local History unchecked when you need history. Manually deleting the system/cache directory also removes Local History, which may hold the only recovery copy of uncommitted or deleted work. Indexes rebuild, but deleted history does not.

Tags:JetBrainsIntelliJCaches

See what’s taking up space on your Mac

DiskJoy explains every item and removes nothing until you review it.
Download for Mac

Cookies on diskjoy.com

Your browser sends a Global Privacy Control signal. We honoured it: analytics and marketing cookies are off.

Necessary cookies run this site. Analytics shows us how it is used: if you accept it, Google receives data about your visit. Change this anytime in Cookie Settings. How Google uses data Cookie Policy Privacy policy

Customize

Purpose
Needed for the site to work and to remember your cookie choice.

Cookies

  • sy_consent - Stores your cookie choice (Retention: 12 months)

Other browser storage

  • sy_consent_pending (localStorage) - Queues your choice until it reaches our server (Retention: until deleted)
Purpose
Show us which pages are visited and how the site is used, so we can improve it. Provider: Google Ireland Ltd (Google Analytics 4).

Cookies

  • _ga - Distinguishes visitors to count them (Retention: 400 days)
  • _ga_TP2XMLG27P - Keeps the state of your current visit (Retention: 400 days)

Recipients

Data controller

Sylentis Group sp. z o.o.. Contact: support@diskjoy.com. Privacy policy

Google may process data outside the European Economic Area (EEA). Safeguards: EU-US Data Privacy Framework, standard contractual clauses.

Right to withdraw

You can withdraw consent at any time, as easily as you gave it. Withdrawal does not affect the lawfulness of processing before it.