如果您的磁盘空间不足并且是uv用户,请不要忘记uv 缓存修剪:
uv cache prune
会删除所有未使用的缓存条目。例如,缓存目录可能包含在先前 uv 版本中创建的条目,这些条目不再需要,可以安全删除。uvuv cache prune
可以安全地定期运行,以保持缓存目录清洁。
我的 Mac 空间刚刚不够了。我运行了OmniDiskSweeper ,发现~/.cache/uv
目录占用了 63.4GB,于是运行了以下命令:
uv cache prune Pruning cache at: /Users/simon/.cache/uv Removed 1156394 files (37.3GiB)
现在我的电脑又可以正常使用了!uv cache prune Pruning cache at: /Users/simon/.cache/uv Removed 1156394 files (37.3GiB)
原文: https://simonwillison.net/2025/Jul/8/uv-cache-prune/#atom-everything