IntelliJ: Change the default cache location (e.g. .IntelliJIdeaXX)

Everything started from a problem I had with PyCharm, where it would create a “.PyCharm30” directory in my home, which would end up being about 300Mb, with a lot of files (2000+files, approx 200 directories). This gets taxed since my home dire gets synced at login/logout with a networked drive.

Fortunately, there’s a way to change this default location to a non-backed-up place (e.g. I have in my home a no-backup directory which is passed over on sync).

Steps are as follows:

  1. Locate the place where you’ve installed you AS (e.g. C:\Program Files\Android Studio)
  2. Go to the bin directory and edit file
  3. Search for idea.config.path and idea.system.path and edit those. I ended up having something like:

    Make sure to uncomment the lines, otherwise you’ll end up with AS recreating the directory in your home.

  4. It’s advisable to keep ${user.home} as directory, because AS will create (or update) the directory for each user!

Things to note:

  • Apparently, according to this, you need to copy the file into your home directory if you’re on a mac :(
  • According to this, the (default) format for folders is:

    Please remember that you have ${user.home} at your disposal to refer to a user’s home directory from the configuration file itself.


A little experiment: If you find this post and ad below useful, please check the ad out :-)

2 thoughts on “IntelliJ: Change the default cache location (e.g. .IntelliJIdeaXX)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top