# JetBrains IDE Cache on Mac: Is It Safe to Delete?

> ~/Library/Caches/JetBrains holds indexes and caches for IntelliJ IDEA, PyCharm and other JetBrains IDEs. It rebuilds, but Local History lives there too.

- Updated: 2026-10-10
- URL: https://fresh.ist/caches/jetbrains/

**TL;DR:** Yes, with one caveat. ~/Library/Caches/JetBrains is each JetBrains IDE's system directory: indexes, compiled caches and Local History. The IDE rebuilds the indexes when you reopen a project, which can take minutes on large codebases. Local History does not come back. Settings, plugins and licenses are stored elsewhere and are not affected.

## Facts from the Freshist app

- Category in Clean: JetBrains Cache — "IDE cache — IntelliJ/PyCharm/etc. rebuild it automatically."
- Location: `~/Library/Caches/JetBrains`
- Risk level: Low risk — Rebuilt automatically by macOS or the app that made it. Freshist selects these for you — you still see every item before anything moves.
- Selected by default: yes
- What Freshist does: Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.

## What JetBrains IDEs keep here

JetBrains calls this the IDE's **system directory**. On a Mac there's one folder per product and version under `~/Library/Caches/JetBrains`, for example `IntelliJIdea2026.2`, `PyCharm2026.2` or `WebStorm2026.1`. According to JetBrains, the system directory "contains caches and local history files". On disk that covers:

- **Indexes** of your project files and libraries, which power search, navigation and code completion.
- **Compiler and build caches** and the virtual file system snapshot.
- **Local History**, the IDE's own record of recent file changes, independent of Git.

The other IDE folders are separate:

| Folder | Contents | Affected by deleting Caches? |
| --- | --- | --- |
| `~/Library/Caches/JetBrains/<Product><Version>` | Indexes, caches, Local History | Yes |
| `~/Library/Application Support/JetBrains/<Product><Version>` | Settings, keymaps, plugins | No |
| `~/Library/Logs/JetBrains/<Product><Version>` | IDE logs | No |

## Where the gigabytes come from

Index size scales with your projects and their dependencies, so a large monorepo or a project with a big SDK can produce gigabytes of index data. The bigger issue on most Macs is version folders: every major upgrade creates a new folder, and the previous version's caches usually stay behind. If you also use Toolbox to run several products, each one has its own set.

## What happens after you clear it

When you next open a project, the IDE shows "Indexing…" and many features (search everywhere, refactorings, some inspections) wait until it finishes. On a small project that's seconds; on a large one it can be a long coffee break. Local History for those projects is gone for good, so commit or save anything you might want to roll back first.

## Checking sizes and versions

```bash
du -sh ~/Library/Caches/JetBrains/*
ls ~/Library/Application\ Support/JetBrains
```

Comparing the two lists shows which cache folders belong to IDE versions you've already moved on from. If you use JetBrains Toolbox, its list of installed tools is another quick check: a cache folder for a product or version that isn't installed there anymore is a leftover.

## Clear it the JetBrains way

For a single misbehaving project, use the IDE's own tool:

1. Choose **File → Invalidate Caches…**
2. Leave **Clear file system cache and Local History** unticked unless the usual invalidation didn't help.
3. Click **Invalidate and Restart**.

To reclaim disk space from old versions, quit all JetBrains IDEs, open `~/Library/Caches/JetBrains` with **Go → Go to Folder…** in Finder, and move the folders for versions you no longer run to the Trash. Remove the current version's folder only if you're happy to re-index everything and lose Local History.

## When to keep it

Keep the current version's caches while you're actively working: re-indexing a big project costs real time. Older version folders and caches for IDEs you've uninstalled are pure leftovers. For editor caches from Microsoft's editor see the [VS Code cache guide](/caches/vscode/); IDE log files are covered under [Logs](/caches/logs/).

## Sources

- [JetBrains: Directories used by the IDE to store settings, caches, plugins and logs](https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html)
- [JetBrains: Invalidate caches](https://www.jetbrains.com/help/idea/invalidate-caches.html)
- [JetBrains: Local History](https://www.jetbrains.com/help/idea/local-history.html)

## Frequently asked questions

### Will I lose my JetBrains license or settings?

No. Settings, keymaps and installed plugins live under ~/Library/Application Support/JetBrains, and license data is kept with the configuration, not the caches. Removing the Caches folder leaves them in place.

### Why are there folders for IDE versions I no longer have?

Each major IDE version gets its own folder, such as IntelliJIdea2025.3 and IntelliJIdea2026.2. When you upgrade, the old version's folder is left behind, and it's the safest part of this directory to remove.

### Is Invalidate Caches the same as deleting the folder?

Not quite. Invalidate Caches marks the current project's caches for rebuilding on restart and keeps Local History unless you tick the option to clear it. Deleting the folder resets every project for that IDE version at once.

---

Canonical page: https://fresh.ist/caches/jetbrains/
Official site: https://fresh.ist/ (fresh.ist only)
Generated: 2026-10-10
