-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable HOMEBREW_AUTOREMOVE by default #17261
Conversation
ca97c0d
to
1824efe
Compare
1824efe
to
79d00c0
Compare
79d00c0
to
8bdcb60
Compare
Enabled `HOMEBREW_AUTOREMOVE` by default, and added `HOMEBREW_NO_AUTOREMOVE` to disable it. Co-authored-by: Ruoyu Zhong <[email protected]>
41d65b9
to
3d11416
Compare
I forgot about this one though I've had it set for years now too. I'm happy that it's finally the default. |
Whoa! That removed all my build dependencies! I don't want to have to re-build all of those every time I upgrade a built formula. Is there an option for the autoremove logic to leave formulae that were installed as build dependencies? E.g.:
|
Hmm yeah that's probably a fair point for the non-default-prefix and/or unsupported OS case. Maybe worth disabling by default on those environments. |
Yea, we already skip attempting to reinstall outdated dependents (as long as linkage isn't broken) if it will result in a source build. |
Not yet, but you can |
I have an in-progress work that allows you to explicitly mark/unmark formulae as installed on request, as discussed in #17125 (comment). When a formula is installed on request, it does not get removed by My Mac is with Genius Bar right now. I'll make a PR when I get it back. |
Maybe we could just exclude all build dependencies used by formula that were built-from-source? |
This seems like the right thing to do 👍🏻 |
That's exactly what I'd hope would happen. |
Ah, I'm an idiot. I should have checked the existing logic before commenting. It looks like it already accounts for build dependencies when checking what's autoremovable. Maybe there's a bug in the current logic. brew/Library/Homebrew/utils/autoremove.rb Lines 32 to 52 in c6368be
|
I wish I'd saved the output when it unexpectedly removed like 15 deps. But my |
Yeah, I agree. It might be worth making a new issue about it while we investigate. |
Yes, please open issue(s) here rather than talking on a merged PR, thanks. |
Opened #17433. |
Enabled
HOMEBREW_AUTOREMOVE
by default, and addedHOMEBREW_NO_AUTOREMOVE
to disable it.I've been running this for years and it's been rock-solid. An incoming minor release feels like a good time to change this default and document it.