微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我们如何减少自制酒桶和自制酒核文件夹的大小?

如何解决我们如何减少自制酒桶和自制酒核文件夹的大小?

有没有办法减少自制酒桶和自制酒核文件夹的大小?它们分别是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 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?