Could somebody please explain why PyCharm caches folder is so big?

Hello,

 

Could somebody please explain why PyCharm caches folder is so big? I ran the disk usage program (ubuntu 18.04) and got this:

 

How can I reduce the size of this folder and prevent it from becoming so big again? 

 

Thanks

 

Ciaran 

3 comments
Comment actions Permalink

Hi Ciaran,

Do you use any symlinks in your projects?
Could you please share your ~/.<product_version>/config/options/jdk.table.xml file?

To reduce its size you can first try File | Invalidate Caches / Restart....

0
Comment actions Permalink

Hi Sergey, 

No I don't generally use symlinks - have large data folders though, was thinking maybe something to do with that? I actually tried invalidating caches and restarting before I shared my disk usages. 

Here is the contents of `jdk.table.xml`

Thanks

Ciaran 

<application>
<component name="ProjectJdkTable">
<jdk version="2">
<name value="Python 3.7 (ncw135)" />
<type value="Python SDK" />
<version value="Python 3.7.3" />
<homePath value="$USER_HOME$/miniconda3/bin/python" />
<roots>
<classPath>
<root type="composite">
<root url="file://$USER_HOME$/miniconda3/lib/python3.7" type="simple" />
<root url="file://$USER_HOME$/miniconda3/lib/python3.7/lib-dynload" type="simple" />
<root url="file://$USER_HOME$/miniconda3/lib/python3.7/site-packages" type="simple" />
<root url="file://$USER_HOME$/.PyCharm2019.1/system/python_stubs/478056651" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/2and3" type="simple" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional ASSOCIATED_PROJECT_PATH="$USER_HOME$" />
</jdk>
<jdk version="2">
<name value="Python 3.7 (py37)" />
<type value="Python SDK" />
<version value="Python 3.7.3" />
<homePath value="$USER_HOME$/miniconda3/envs/py37/bin/python" />
<roots>
<classPath>
<root type="composite">
<root url="file://$USER_HOME$/miniconda3/envs/py37/lib/python3.7" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py37/lib/python3.7/lib-dynload" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py37/lib/python3.7/site-packages" type="simple" />
<root url="file://$USER_HOME$/.PyCharm2019.1/system/python_stubs/-749777340" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/2and3" type="simple" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional ASSOCIATED_PROJECT_PATH="$USER_HOME$/Documents/MesiSTRAT/CrossTalkModel" />
</jdk>
<jdk version="2">
<name value="Python 3.6 (py36)" />
<type value="Python SDK" />
<version value="Python 3.6.8" />
<homePath value="$USER_HOME$/miniconda3/envs/py36/bin/python" />
<roots>
<classPath>
<root type="composite">
<root url="file://$USER_HOME$/miniconda3/envs/py36/lib/python3.6" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36/lib/python3.6/lib-dynload" type="simple" />
<root url="file://$USER_HOME$/.local/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/.PyCharm2019.1/system/python_stubs/-878860059" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/2and3" type="simple" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional />
</jdk>
<jdk version="2">
<name value="Python 3.6 (py36-new-pycotools)" />
<type value="Python SDK" />
<version value="Python 3.6.8" />
<homePath value="$USER_HOME$/miniconda3/envs/py36-new-pycotools/bin/python" />
<roots>
<classPath>
<root type="composite">
<root url="file://$USER_HOME$/miniconda3/envs/py36-new-pycotools/lib/python3.6" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36-new-pycotools/lib/python3.6/lib-dynload" type="simple" />
<root url="file://$USER_HOME$/.local/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36-new-pycotools/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/.PyCharm2019.1/system/python_stubs/157503001" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/2and3" type="simple" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional />
</jdk>
<jdk version="2">
<name value="Python 3.6 (py36-old-pycotools)" />
<type value="Python SDK" />
<version value="Python 3.6.8" />
<homePath value="$USER_HOME$/miniconda3/envs/py36-old-pycotools/bin/python" />
<roots>
<classPath>
<root type="composite">
<root url="file://$USER_HOME$/miniconda3/envs/py36-old-pycotools/lib/python3.6" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36-old-pycotools/lib/python3.6/lib-dynload" type="simple" />
<root url="file://$USER_HOME$/.local/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/miniconda3/envs/py36-old-pycotools/lib/python3.6/site-packages" type="simple" />
<root url="file://$USER_HOME$/.PyCharm2019.1/system/python_stubs/282276850" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2and3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/3" type="simple" />
<root url="file://$APPLICATION_HOME_DIR$/helpers/typeshed/third_party/2and3" type="simple" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional ASSOCIATED_PROJECT_PATH="$USER_HOME$/Documents/MesiSTRAT/CrossTalkModel" />
</jdk>
</component>
</application>

0
Comment actions Permalink

Haven't found anything unusual in jdk.table.xml

>have large data folders though, was thinking maybe something to do with that?

Is it inside of your project? It could be that PyCharm is indexing them and hence the caches folder grows bigger. The solution in such cases is to store these files outside of your project or mark them as Excluded.

I tried renaming that folder on my side (to test if it's safe to remove it) and it seems to be fine.

0

Please sign in to leave a comment.