本文转载自:
Intellij或者pycharm的缓存目录好大哦,怎么从C盘移动出去
Intellij、pycharm或者phpstorm等jetbrains系列的软件,会有一个缓存目录,默认放在C盘的用户目录下。
我的几个加一起占了几个G,最近C盘空间有点捉急,刚好看到这个,就打算挪到D盘去。
![](http://upload-images.jianshu.io/upload_images/8179604-f833378712b851e1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/591/format/webp)
1、修改配置
打开软件的安装目录,bin目录下有一个idea.properties文件
![](http://upload-images.jianshu.io/upload_images/8179604-3f7a219fdf208bc4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/922/format/webp)
打开看看,四个红框位置,指定了缓存、log、插件等文件的存储位置,默认都是在use.home下的,不过他默认是注释掉的。
![](http://upload-images.jianshu.io/upload_images/8179604-cea16937ac325648.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1000/format/webp)
跟我一样在下面添加一行,路径直接写死为某个你需要的路径
![](https://i-blog.csdnimg.cn/blog_migrate/4a913ac6eb52ce03039b725c9b943938.png)
idea.config.path=D:/idea/.PyCharm2018.3/config
idea.system.path=D:/idea/.PyCharm2018.3/system
idea.plugins.path=D:/idea/.PyCharm2018.3/plugins
idea.log.path=D:/idea/.PyCharm2018.3/log
2、然后就是怎么把老的配置迁移到新的目录了,有两种方法:
(1)第一种简单暴力,直接把C盘下的缓存目录拷贝到你写的目录下就可以了,我就是这么干的。
如果C盘下本来就没有的目录,比如plugins或者log,也不需要特意去新建文件夹,需要的时候它自动就会新建了。
![](https://i-blog.csdnimg.cn/blog_migrate/c4b8a97d175f78f9a521007ac3e0c2f6.png)