Depending on the version you are using. Itβs basically the same, just
File -> Invalidate cache, then restart Intellij
or
File β Invalidate caches / Restart
The main difference is that in older versions you had to restart manually, because the cache files are not deleted before the restart. Newer versions will ask if you want to restart the computer.

As seen here on the Jetbrains official help page
You can also try deleting caches manually in the system folder for the installed version. The location of this folder depends on your OS and the installed version.
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 location.
Java Devil Jul 10 '13 at 3:16 2013-07-10 03:16
source share