# Invalidate caches

When you invalidate the cache, CLion 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.

> **Note:**
> Note the following before you proceed:
>
>
>
> * The caches will not be deleted until you restart CLion.
>
> * 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…`.

![The Invalidate Caches dialog](https://resources.jetbrains.com.cn/help/img/idea/2026.2/cl_cleancaches_dialog.png)

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)), `⌘ ⇧ A` (Xcode), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (ReSharper), `⌘ ⇧ A` (ReSharper (macOS)), `Ctrl+Shift+A` (QtCreator), `⌘ ⇧ A` (QtCreator (macOS)), `Ctrl+I` (NetBeans), `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.

* Clear remote hosts caches: SSH and [Docker](clion-toolchains-in-docker.html) caches will be marked invalid and then cleared. The caches will be downloaded again upon project reload.

* Reset CMake Cache: [reset CMake cache](cmake-cache.html#reset-cache) along with the IDE cache.

* 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.

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)), `⌘ ⇧ A` (Xcode), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (ReSharper), `⌘ ⇧ A` (ReSharper (macOS)), `Ctrl+Shift+A` (QtCreator), `⌘ ⇧ A` (QtCreator (macOS)), `Ctrl+I` (NetBeans), `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).

## See also

### How tos

[CMake cache](cmake-cache.html) [Docker toolchain](clion-toolchains-in-docker.html)

