如何解决我们如何减少自制酒桶和自制酒核文件夹的大小?
有没有办法减少自制酒桶和自制酒核文件夹的大小?它们分别是230.7 MB和346.5 MB。
此外,brew cleanup
并没有做很多事情,二进制文件仍然存在于〜/ Library / Caches / Homebrew / downloads文件夹中,这是设计使然吗?
解决方法
是的,这是设计使然。
man brew
对此进行了详细描述:
cleanup [options] [formula|cask ...]
Remove stale lock files and outdated downloads for all formulae and casks,and remove old versions of installed formulae. If arguments are specified,only
do this for the given formulae and casks. Removes all downloads more than 120 days old. This can be adjusted with HOMEBREW_CLEANUP_MAX_AGE_DAYS.
--prune
Remove all cache files older than specified days. If you want to remove everything,use --prune=all.
-n,--dry-run
Show what would be removed,but do not actually remove anything.
-s Scrub the cache,including downloads for even the latest versions. Note downloads for any installed formulae or casks will still not be deleted. If
you want to delete those too: rm -rf "$(brew --cache)"
--prune-prefix
Only prune the symlinks and directories from the prefix and remove no other files.
因此您可以运行 brew cleanup -s
以从缓存中删除更多内容,或运行 rm -rf $(brew --cache)
以删除整个缓存。
另见https://github.com/Homebrew/brew/issues/3784
这是预期的行为。如果要删除所有内容,请运行建议的 rm 命令。
感谢您的回答。保留已安装的公式下载文件有什么用?
万一出现问题,您必须重新安装。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。