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

相关推荐
小玉起起3 天前
IntelliJ IDEA 2025.1 Java Stream Debugger 快速使用指南
java·intellij-idea·idea
十八旬3 天前
【超简单】后端入门案例-基于SpringBoot+MyBatis-plus+MySQL图书管理系统
java·开发语言·idea·intellij idea·项目实战
东方芷兰4 天前
Leetcode 刷题记录 21 —— 技巧
java·算法·leetcode·职场和发展·github·idea
稻草猫.5 天前
Java多线程(一)
java·后端·java-ee·idea
猫头虎11 天前
IDE mac M芯片安装报错:如何解决“InsCode.app 已损坏”,无法打开
ide·vscode·macos·inscode·编辑器·idea·mac
Doris_LMS11 天前
Git的强软硬回退(三)
运维·服务器·数据库·git·idea
Doris_LMS12 天前
Git在idea中的实战使用经验(二)
linux·运维·gitlab·idea
十八旬12 天前
苍穹外卖项目实战(日记十四)-记录实战教程及问题的解决方法-(day3课后作业) 菜品停售启售功能
数据库·windows·spring boot·阿里云·idea
窗外的寒风12 天前
vscode炒股插件-韭菜盒子AI版
vscode·idea
Doris_LMS13 天前
Git在idea中的实战使用经验(一)
java·git·gitlab·idea