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

相关推荐
想躺平的咸鱼干2 天前
RabbitMQ 基础
java·分布式·rabbitmq·idea·amqp·消息转换器·交换机模型
optimistic_chen8 天前
【Java EE进阶 --- SpringBoot】初识Spring(创建SpringBoot项目)
spring boot·后端·spring·java-ee·tomcat·mvc·idea
猫头虎10 天前
如何解决 JetBrains IntelliJ IDEA 2024.2 和 2025.2 新版本区域选择问题:key is invalid
java·ide·pycharm·intellij-idea·idea·intellij idea·phpstorm
hweiyu0017 天前
IDEA搭建GO环境
开发语言·后端·golang·intellij-idea·idea·intellij idea
BUG?不,是彩蛋!17 天前
从零开始用 Eclipse 写第一个 Java 程序:HelloWorld 全流程 + 避坑指南
java·eclipse·idea
小咖张21 天前
idea 服务器Debug端口启动设置
idea
Joker—H1 个月前
【Java】Reflection反射(代理模式)
java·开发语言·经验分享·代理模式·idea
无名客01 个月前
JAVA_TWO-初识Java2
java·intellij-idea·idea·java基础
设计师小聂!1 个月前
尚庭公寓--------登陆流程介绍以及功能代码
java·spring boot·maven·mybatis·idea