How to clean project cache in Intellij idea like Eclipse's clean?

Marshall picture Marshall · Jul 10, 2013 · Viewed 177.3k times · Source

Sometimes the IDE makes some error because of the cache. In Eclipse, we can use clean to solve the problem. But how can I do this in IntelliJ?

Answer

Java Devil picture Java Devil · Jul 10, 2013

Depending on the version you are running. It is basically the same just go to
File -> Invalidate caches, then restart Intellij
or
File -> Invalidate caches / Restart

The main difference is that in older versions you had to manually restart as cache files are not removed until you restart. The newer versions will ask if you also want to restart.

Older versions Newer Versions

As seen here on this official Jetbrains help page


You can also try delete caches manually in the system folder for your installed version. The location of this folder depends on your OS and version installed.

Windows Vista, 7, 8, 10
<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>

Linux/Unix
~/.<PRODUCT><VERSION>

Mac OS
~/Library/Caches/<PRODUCT><VERSION>

Read this for more details on cache locations.