前几天,brew cleanup 了一下,磁盘突然多出了 24 个 G。
各位都是经常性的 brew cleanup 的吗?
1
qihu3721 2018-08-30 07:38:46 +08:00
每天运行一次
#!/bin/bash brew update && brew upgrade && brew cleanup |
2
idlerlestat 2018-08-30 08:30:53 +08:00 3
update() {
if hash brew 2>/dev/null; then echo "Updating Homebrew" brew update echo "Upgrading Homebrew" brew upgrade echo "Upgrading Homebrew Casks" brew cu -a -y echo "Some additional cleaning" brew cleanup -s find $(brew --cache) -maxdepth 2 -type f -delete fi } |
3
agagega 2018-08-30 08:46:14 +08:00 via iPhone
128G,没办法
|
4
wu67 2018-08-30 09:07:57 +08:00
```bash
echo "$ brew update..." brew update echo "$ brew upgrade..." brew upgrade echo "$ brew cleanup..." brew cleanup echo "$ npm upgrade -g" npm upgrade -g caskapp=`brew cask list` for app in $caskapp do echo "$ try upgrae" ${app} brew cask upgrade $app done ``` 自己写的的渣渣脚本 |
5
congeec 2018-08-30 09:21:01 +08:00
brew up --cleanup
|
6
belin520 2018-08-30 09:29:37 +08:00
我也基本没有运行过,然后看到这个帖,尝试了下
==> This operation has freed approximately 889B of disk space. 这,剧本不一样啊 |
7
NSAtools 2018-08-30 09:39:33 +08:00
This operation has freed approximately 105.0MB of disk space
|
8
SKull4 2018-08-30 09:41:05 +08:00
==> This operation has freed approximately 313.6MB of disk space.
|
9
lddsb 2018-08-30 09:41:51 +08:00
如果你装了 rust 而且经常 brew upgrade 的话,你就会知道 brew cleanup 是多么重要。。
|
10
lucifer9 2018-08-30 10:14:02 +08:00
别忘了还有 brew prune
|
11
MagicRabbit0503 2018-08-30 10:15:32 +08:00
This operation has freed approximately 97.3MB of disk space.
|
13
haha1903 2018-08-30 10:44:26 +08:00
This operation has freed approximately 3.7GB of disk space.
|
14
ChopinWong 2018-08-30 10:45:41 +08:00
brew update
brew upgrade brew prune brew cleanup |
15
bjfane 2018-08-30 11:46:13 +08:00
This operation has freed approximately 64B of disk space. 没事就会清。 哈哈
|
16
RoshanWu 2018-08-30 12:17:12 +08:00
alias bubo='brew update && brew outdated'
alias bubc='brew upgrade && brew cleanup' alias bubu='bubo && bubc' |
17
ck65 2018-08-30 13:12:52 +08:00
This operation has freed approximately 541.7MB of disk space.
|
18
Baka9 2018-08-30 13:17:08 +08:00
This operation has freed approximately 7GB of disk space.
第一次看到这个命令。。( |
19
DigDeeply 2018-08-30 13:22:05 +08:00
==> This operation has freed approximately 8.9MB of disk space.
|
20
czjackjin 2018-08-30 13:49:25 +08:00
每天 upgrade,今天第一次看到可以 cleanup,多出来 2 个 g,128g 的 ssd,还是蛮可观的
|
21
tyhunter 2018-08-30 14:09:48 +08:00
先 upgrade 后 cleanup,清理出 500m 的空间
|
22
zjb861107 2018-08-30 14:26:48 +08:00
This operation has freed approximately 310MB of disk space.
|
23
yeleiyu 2018-08-30 16:51:27 +08:00
This operation has freed approximately 67.1MB of disk space.
不常用,所以能释放的空间也很有限啊~~~~ |
24
livc 2018-08-30 17:14:00 +08:00
==> This operation has freed approximately 1GB of disk space.
|
25
vjnjc 2018-08-30 20:04:45 +08:00 via Android
原来能这样啊,多谢分享
|
26
1002xin 2018-08-30 21:01:25 +08:00
想起来 up 一次
|
27
dif 2018-08-31 09:45:00 +08:00
256 没办法,更新一次执行一次。
|
28
AnyISalIn 2018-08-31 10:04:26 +08:00
==> This operation has freed approximately 270.9MB of disk space.
|
29
ShuangFan 2018-08-31 11:11:56 +08:00
最近刚研究了一下 launchctl 写了一个超简单的定时任务,每天固定时间更新清理一下 brew,顺便提醒我订外卖
|
30
yuanxing008 2018-09-01 00:18:00 +08:00
从未执行过、、、待会试试。。不过我 2T 的盘应该不怎么需要经常执行吧。。
|
31
thiswind 2019-11-15 18:58:08 +08:00
|
32
thiswind 2019-11-15 19:00:39 +08:00 1
@qihu3721
prune 今年 deprecated 了 #!/bin/bash brew update && brew upgrade && brew cleanup && brew cleanup --prune 3 # 清理早于 3 天的 |
34
evam 2021-01-19 16:41:19 +08:00
brew prune
Error: Unknown command: prune ❌ brew cleanup --prune 3 ✅ |