调整Idea缓存目录,释放C盘空间

本文使用 Idea2024

Idea 会将一些配置默认缓存在C盘,使用久了会占用大量空间(本人的Idea占用了将近5个G,以至于不得不进行迁移)


缓存目录主要涉及以下四个目录,四个目录可以分为两组,每组目录必须一起调整

配置名 默认路径
idea.config.path C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2024.1
idea.system.path C:\Users\JohnS\AppData\Local\JetBrains\IntelliJIdea2024.1
idea.plugins.path C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2024.1\plugins
idea.log.path C:\Users\JohnS\AppData\Local\JetBrains\IntelliJIdea2024.1\log

打开 ${idea.home.path}/bin/idea.properties 配置文件,修改相关参数的路径

properties 复制代码
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
idea.config.path=D:/idea2024/config

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the caches directory.
#---------------------------------------------------------------------
idea.system.path=D:/idea2024/system

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the user-installed plugins directory.
#---------------------------------------------------------------------
idea.plugins.path=${idea.config.path}/plugins

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the logs directory.
#---------------------------------------------------------------------
idea.log.path=${idea.system.path}/log

将默认路径中的文件复制至新路径,然后重启 Idea,原来的配置不会丢失。

然后就可以删除默认路径中的文件啦,释放大量空间。


不同的版本可以参考官网文档:
https://www.jetbrains.com/help/idea/2024.1/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory

相关推荐
H_HX1261 天前
IDEA的下载和安装
java·intellij-idea·idea
斯文的八宝粥2 天前
3.4 HMAC-SHA1 完整实现
idea
我命由我123453 天前
方差(实例实操、与标准差的区别)
java·数据结构·算法·数据分析·java-ee·intellij-idea·idea
ssuuxx1 个月前
上海格致中学附近新高一数学补课班筛选维度:思维拓展、解题更顺测评
idea
love_muming1 个月前
链表每日一练
java·开发语言·数据结构·链表·idea·每日一练
月夜奇术师1 个月前
idea的Maven控制台乱码解决方案
maven·idea
zhangpba1 个月前
IntelliJ IDEA 集成通义灵码
ai·idea
小林敲代码77881 个月前
记录一下IDEA中很多变量变色的方案
java·开发语言·spring boot·idea
gSZrkhJsY1 个月前
【无标题】
jupyter·idea
我命由我123451 个月前
Java 开发 - Jar 包与 War 包
java·开发语言·java-ee·intellij-idea·jar·idea·intellij idea