Skip to content
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

Ability to remove formula from user requested installs when it's also a dependency #19430

Closed
1 task done
jrz opened this issue Mar 5, 2025 · 3 comments
Closed
1 task done

Comments

@jrz
Copy link

jrz commented Mar 5, 2025

Verification

Provide a detailed description of the proposed feature

When brew remove [formula] fails because the package is a dependency, it should unmark the user-requested flag.

Instead of doing it automatically (which makes the most sense, as the user is requesting it to be uninstalled), it could also be a flag.

What is the motivation for the feature?

Some formulas are installed because of dependency, but also user-requested. Imagemagick for example. When I want to remove the formula which still has a dependency, I cannot remove it. This is logical. However, I do want it to be removed as "user requested".

This also helps me clean up older brew installations where for example, groonga is listed as user-installed (because of mariadb)

How will the feature be relevant to at least 90% of Homebrew users?

It keeps your list of installed packaged lean and manageable. Allows for better purging/cleaning, and therefore a smaller attack surface as well of course.

What alternatives to the feature have been considered?

Remove all the dependent formulas first, and reinstall everything except the formula I want to have unmarked. For the mariadb/groonga example, I'm unwilling to do so as I'm not sure what happens to the data. I've never requested "groonga".

@gromgit
Copy link
Contributor

gromgit commented Mar 5, 2025

However, I do want it to be removed as "user requested".

That's where you can tell Homebrew what you want with brew tab --no-installed-on-request <formula>.

If it were unmarked automatically on removal failure, you won't even know that it happened when you do change your mind at a later date, and end up filing a bug report that "why did brew automatically uninstall imagemagick when I specifically installed it manually?!?!" That would lead us Homebrew volunteers on a wild good chase, and we wouldn't want that to happen.

@jrz
Copy link
Author

jrz commented Mar 5, 2025

Ahh that makes sense. Didn't know about this tab feature. Perhaps a message when it was actually user-requested could make sense

@MikeMcQuaid
Copy link
Member

Thanks for the idea, as @gromgit said: passing on this for now but if we get this request more in future I'd consider it.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants