这次主要清理开发工具缓存。能重建的直接删,不能删但会长期占空间的,就先复制到D盘,然后改所需的配置到新路径,再删老路径。
复制文件推荐使用 FastCopy。删除大文件夹推荐使用 CMD 命令rmdir /s /q folder。
-
uv查看缓存目录:
uv cache dir清理缓存:
uv cache clean如需迁移缓存目录,可设置:
setx UV_CACHE_DIR D:\software\uv\cache -
Gradle把
.gradle缓存迁到别的盘,设置:setx GRADLE_USER_HOME D:\software\Gradle -
Yarn修改缓存目录:
yarn config set cache-folder "D:\software\Yarn\Cache" -
Maven把本地仓库从
${user.home}\.m2\repository改到D:\maven\repository。在%USERPROFILE%\.m2\settings.xml中加入:<localRepository>D:\maven\repository</localRepository>
参考:
-
https://stackoverflow.com/questions/186737/whats-the-fastest-way-to-delete-a-large-folder-in-windows
-
https://blog.csdn.net/github_38616039/article/details/79933133
-
https://blog.csdn.net/zimeng303/article/details/109741322
-
https://www.cnblogs.com/technicist/p/15060205.html
