# Invalidate caches

IntelliJ IDEA caches a great number of files for all projects that you have ever worked with in this IDE version, therefore, the system cache may become overloaded. Sometimes the caches will never be needed again, for example, if you work with frequent short-term projects.

When you invalidate the cache, IntelliJ IDEA removes the cache files for all projects ever run in the current version of the IDE. The files will be recreated the next time you open these projects. The IDE also rebuilds the projects if they are built with the native IntelliJ IDEA builder.

> **Note:**
> Note the following before you proceed:
>
>
>
> * The caches will not be deleted until you restart IntelliJ IDEA.
>
> * Opening and closing a project without invalidating the cache does not result in deleting any cached files.
>
> * [Local History](local-history.html) is not deleted when you invalidate the cache unless you explicitly [enable this option](#options) in the Invalidate Caches dialog. However, mind that Local History has a retention period of 5 working days by default.

Procedure: Clear system cache

1. From the main menu, select `File | Invalidate Caches…`.

Press  `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)), start typing `Invalidate Caches` , then select the action from the list.

2. In the Invalidate Caches dialog, you can select additional actions that the IDE will perform while removing the cache files:

* Clear file system cache and Local History : remove the virtual file system cache together with the information stored in Local History. This action might be helpful for troubleshooting purposes when the usual cache invalidation is not enough to solve the problem.

* Clear VCS Log caches and indexes: remove the cache and indexes of the VCS Log. Enable this option if you are certain that your VCS Log indexes are broken, for example, if the Log search does not work correctly.

* Delete embedded browser engine cache and cookies: remove the cache files and cookies that are stored in the built-in JCEF browser. These files rarely get broken. This option allows you to invalidate the cache while keeping JCEF cookies and caches intact.

3. Click Invalidate and Restart.

![the Invalidate Cache dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/invalidate-cache-dialog.png)

If you click Just restart, cache files won't be deleted, and the selected optional actions will not be applied.

> **Tip:**
> We recommend that you restart the IDE via Find Action: press `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)) and type `Restart IDE`.

For more information about storage of various user-specific files, refer to [Directories used by the IDE](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html).

## Troubleshoot

If the IDE crashes (exits unexpectedly) or freezes, you can try troubleshooting it using the information in the IntelliJ IDEA support knowledge base: [How to troubleshoot IntelliJ IDEA crash or freeze](https://youtrack.jetbrains.com/articles/SUPPORT-A-57/How-to-troubleshoot-IntelliJ-IDE-crash-or-freeze).

## See also

### Procedures

[Project analysis](project-analysis.html) [Shared indexes](shared-indexes.html)

