Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clean project cache in IntelliJ IDEA like Eclipse's clean?

People also ask

How do I clean up my IntelliJ project?

To clean up the local working copy, do one of the following: Select the desired file or directory in the Project tool window and choose Subversion | Cleanup from the context menu of the selection. Open the desired file in the editor and choose VCS | Subversion | Cleanup from the main menu.

Is it safe to delete IntelliJ cache?

Yes, that is safe. Alternatively, you can invalidate caches from inside IntelliJ by choosing the File -> Invalidate Caches... menu option.

Where does IntelliJ store cache?

By default, IntelliJ IDEA stores user-specific files for each IDE instance (configuration, caches, plugins, logs, and so on) in the user's home directory.


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


Maybe not THE answer, but it's definitely AN answer.

If nothing else is working for you, go the nuclear option: Close IDEA and delete the ".../.IntelliJIdea/system" directory using your local file system tools.

The .IntelliJIdea directory is usually found in your home directory. Your IDE configuration is in the ".../.IntelliJIdea/config" directory, so it should be fine.

Obviously, this is not the "IDEA" way to do it and would be completely unsupported by JetBrains. Also - I don't use Android Studio so I dunno if this will cause problems, but there you go.

It's worked for me before when I've had problems getting IDEA to start and nothing else works to get me going. Maybe back up your entire .IntelliJIdea directory if you have a morbid fear of losing all your work >.<


In addition to the .Intellij* files, and invalidating the cache, if you really want to clear everything out, then also delete the .idea folder and *.iml per-project files that IntelliJ also generates...