4 ms·
Automatic cleanup sounds like a major improvement. It's almost scary how much disk space is used by Brew if you don't/didn't run cleanup periodically. Since I
by LeonM 8y ago
Automatic cleanup sounds like a major improvement. It's almost scary how much disk space is used by Brew if you don't/didn't run cleanup periodically.
Since I don't install 'mission critical' application through brew, I've always had the following command run daily though a cronjob:
brew update && brew upgrade && brew cleanup
- verisimilitude 8y agoPossibly helpful to some macOS folks: I converted all of my cronjobs to launchd agents/daemons and the increased dependability has been helpful, since I use a laptop which sleeps a lot. What I mean: "Unlike cron which skips job invocations when the computer is asleep, launchd will start the job the next time the computer wakes up. If multiple intervals transpire before the computer is woken, those events will be coalesced into one event upon wake from sleep."[1] [1]: http://www.launchd.info http://www.launchd.info
- clessg 8y agoHa, I wish I knew about that command earlier. I was wondering where all my disk space was going. ==> This operation has freed approximately 41.3GB of disk space. Automatic cleanup would have saved me a lot of confusion.
- kri3v 8y ago==> This operation has freed approximately 3.3GB of disk space. Wow, thanks
- mr_custard 8y agoWow. That's so true. I just got back 5GB. I didn't know about this. Thanks :-)
- mikemcquaid 8y agoI'm excited about it. `brew upgrade` now runs `brew update` and if you set the environment variable `brew upgrade` will run `brew cleanup` too.
- mmebane 8y ago> `brew upgrade` now runs `brew update` Is that documented anywhere? I guess it makes sense for most people, but I often do `brew update && brew fetch $(brew outdated)`, then later rely on `brew upgrade` working without hitting the network. I'd hate for that to change.
- mikemcquaid 8y agoIt's not explicitly documented but it's the same behaviour as has been on `brew tap` and `brew install` since we introduced auto-update. `man brew` details how to customise this behaviour.
- bump-ladel 8y agoI didn't know cleanup existed, so never ran it until now. ==> This operation has freed approximately 8.9GB of disk space.
- Hoasi 8y ago==> This operation has freed approximately 343.7MB of disk space. Wait, that's not trivial.
- stabbles 8y agoI wanted to comment about this as a LPT because of past experiences, then went to run `brew update` and `brew upgrade` which took more than an hour because it had to build a new version of LLVM from source... Then I ran `brew cleanup` and boom, 4.4GB of free space on a MacBook Air with a small disk. Overall I hate how slow brew is, especially `update` should be 10x faster, it should maybe warn about source builds that could take forever, and it should maybe give a summary like `apt` whether there are packages to be `autoremove`d.
- Hackbraten 8y agoYou may know it already but as a PSA: you can usually avoid source builds on `brew install` and `brew upgrade` if you do it without options (such as `--with-lldb`). Unless you customize your installation using options, Homebrew will install your package from bottle, which is infinity times faster than building from source.
- ungzd 8y agoUpgrading Postgresql between major version requires previous version to be installed[1]. With auto-cleanup, when new version is installed, old will be uninstalled automatically, unless they added some exclusion mechanism for it, but I don't see anything about it in "postgres" formula[2]. [1] https://www.postgresql.org/docs/11/pgupgrade.html https://www.postgresql.org/docs/11/pgupgrade.html [2] https://github.com/Homebrew/homebrew-core/blob/master/Formula/postgresql.rb https://github.com/Homebrew/homebrew-core/blob/master/Formul...
- mikemcquaid 8y agoYeh, we did: - https://github.com/Homebrew/homebrew-core/pull/35169 https://github.com/Homebrew/homebrew-core/pull/35169 - https://github.com/Homebrew/brew/pull/5390 https://github.com/Homebrew/brew/pull/5390