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

相关推荐
想躺平的咸鱼干1 天前
ollama的下载以及Spring AI Alibaba的ChatModel和ChatClient的流式输出和在idea的实现
windows·https·idea·流式输出·springaialibaba·chatclient·chatmodel
那我掉的头发算什么2 天前
【数据结构】双向链表
java·开发语言·数据结构·链表·intellij-idea·idea
稻草猫.10 天前
Java线程安全:volatile与wait/notify详解
java·后端·idea
执键行天涯10 天前
IDEA中 .gitignore忽略文件中忽略了某个文件夹,比如.idea/ 但是里面的文件还是显示在idea的提交区域。怎么处理?
idea·.gitignore
ziyue757511 天前
idea终端添加git-bash,支持linux的shell语法
linux·git·bash·idea·软件
简单点了11 天前
IDEA运行/调试配置找不到对应脚本的命令
idea
Chan1612 天前
【 设计模式 | 行为型模式 观察者模式 】
java·spring boot·后端·spring·观察者模式·设计模式·idea
小玉起起23 天前
IntelliJ IDEA 2025.1 Java Stream Debugger 快速使用指南
java·intellij-idea·idea
十八旬24 天前
【超简单】后端入门案例-基于SpringBoot+MyBatis-plus+MySQL图书管理系统
java·开发语言·idea·intellij idea·项目实战