IDEA修改系统缓存路径,防止C盘爆满

最近把电脑上以前旧版本的IDEA、PyCharm等编辑器都更新了以下,以前的版本较久了,更新后防止软件用着用着C盘满了,修改了一些缓存路径的配置,记录一下防止自己以后再安装时遗忘。

1 修改配置文件idea.properties

在idea安装路径的bin目录下,打开idea.properties文件:

修改如下配置项:

bash 复制代码
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.IntelliJIdea/config
idea.config.path=自定义路径
# 该路径是IDEA的一些配置,比如主题、字体等

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the caches directory.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IntelliJIdea/system
idea.system.path=自定义路径
# 该路径是系统缓存和本地历史记录等

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the user-installed plugins directory.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins
# 不用修改,默认使用idea.config.path路径,该路径是IDEA下载的插件

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the logs directory.
#---------------------------------------------------------------------
# idea.log.path=${idea.system.path}/log
# 不用修改,默认使用idea.system.path路径,该路径是IDEA的日志文件

修改后,保存并退出。

2 旧数据迁移

IDEA默认把这四个路径的数据保存在C盘,如果想要使用以前的配置数据就需要把C盘的数据迁移到刚刚配置的自定义路径下:

bash 复制代码
# Local路径存储的是系统数据
C:\Users\JohnS\AppData\Local\JetBrains\IntelliJIdea2025.2
# Roaming路径存储的是配置数据
C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2025.2

根据自己电脑的用户路径,打开上述路径:

.\Local\JetBrains\IntelliJIdea2025.2路径下的数据移动到idea.system.path定义的路径下;

.\Roaming\JetBrains\IntelliJIdea2025.2路径下的数据移动到idea.config.path定义的路径下。

3 重启IDEA

重新启动IDEA,就可以发现之前IDEA的旧配置成功加载到新的IDEA中了。

相关推荐
独泪了无痕20 小时前
探索Pinyin4j-Java中的拼音转换利器
java·后端
道尔柯南21 小时前
C++ string 类详解:从常用接口到深拷贝,彻底掌握字符串处理
android·java·c++
kingx31 天前
Bugku 3122 谷歌小恐龙题解:纯离线逆向 Vault 的 AES-GCM 加密资源(附 Python 解密器)
java·逆向·ctf·bugku·aes-gcm
DevOpenClub1 天前
职教高考控制线 API:招生类别枚举、筛选与空分数含义
java·数据库·高考
露天赏雪1 天前
第3篇:Sentinel熔断降级实战:大模型接口抖动时的服务兜底方案
java·开发语言·人工智能·spring boot·spring·servlet·sentinel
天天被压力1 天前
【A股分钟级高频数据完全手册 #06】北交所分钟级数据接口:京市股票Pro版最新分时
java·人工智能·python
天天被压力1 天前
【A股分钟级高频数据完全手册 #05】指数历史分钟数据接口:Pro版沪深指数分时回放
java·人工智能·python
captain3761 天前
▲统一功能——DispatcherServlet源码分析
java·spring·java-ee·log4j·maven
金銀銅鐵1 天前
JDK 21 中 List.of 的实现细节:从 List12 到 ListN
java·后端·ai编程
yeccheng1 天前
MySQL 索引超详解:从底层 B+ 树到面试高频考点
java·开发语言·jvm·mysql·面试