[Solved] How to clean project cache in Intellij idea like Eclipse’s clean?

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?

Enquirer: Marshall


Solution #1:

Depending on the version you are running. It is basically the same just go to
File -> Invalidate caches, then restart Intellij
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


Mac OS

Read this for more details on cache locations.

Respondent: Java Devil

Solution #2:

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

Respondent: Shorn

Solution #3:

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…

Respondent: rogerdpack

Solution #4:

Try this:

Go into Settings (File > Settings or ctrl+alt+S). Under Project Settings, select the “Compiler” node. On the left, uncheck “Clear output directory on rebuild”.

Note that this is a per project setting. If desired, change it in the project template settigs (Settings > Other Settings > Template Settings).

Respondent: Juned Ahsan

Solution #5:

1) File -> Invalide Caches (in IDE IDEA)

2) Manually, got to C:UsersAppDataLocalJetBrainsIntelliJ IDEA systemcaches and delete


Respondent: AlexPes

Solution #6:

Delete the “target” folder under the offending module. Then Build | Rebuild Project. Also make sure your clear the web browsers cache.

Respondent: Philip Rego

Solution #7:

you can not clean and build to project like netbeans or eclipse. There is no naturaly ant file of intellij idea, because of intellij working without ant file, it has iml file. if you want to to clean and build to project like another idea, you must create manually ant file and add the button with xml code.

Respondent: anar1501

Solution #8:

Another solution was VCS -> Cleanup Project

Respondent: TOTOR

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy