调整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

相关推荐
小咖张11 小时前
idea 服务器Debug端口启动设置
idea
Joker—H8 天前
【Java】Reflection反射(代理模式)
java·开发语言·经验分享·代理模式·idea
无名客012 天前
JAVA_TWO-初识Java2
java·intellij-idea·idea·java基础
设计师小聂!13 天前
尚庭公寓--------登陆流程介绍以及功能代码
java·spring boot·maven·mybatis·idea
Joker—H18 天前
【Java】JUC并发(线程的方法、多线程的同步并发)
java·开发语言·经验分享·idea
默默coding的程序猿1 个月前
3.前端和后端参数不一致,后端接不到数据的解决方案
java·前端·spring·ssm·springboot·idea·springcloud
巴里巴气1 个月前
git常用操作 --- idea编译器 --- 公司实战版
git·idea
巴里巴气1 个月前
idea编译器使用git拉取、提交非常慢的原因和解决方案
git·idea
nvvas1 个月前
JETBRAINS IDE 开发环境自定义设置快捷键
pycharm·编辑器·intellij-idea·idea