brew autoremove not removing stuff
brew doctor output
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
meld
Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
juju-wait
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.
Unexpected header files:
/usr/local/include/node/cppgc/common.h
/usr/local/include/node/js_native_api.h
[so many files]
/usr/local/include/node/zlib.h
Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
fish_add_path /opt/homebrew/sbin
Verification
- [X] My "
brew doctoroutput" above saysYour system is ready to brew.and am still able to reproduce my issue. - [X] I ran
brew updatetwice and am still able to reproduce my issue. - [X] This issue's title and/or description do not reference a single formula e.g.
brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
brew config output
HOMEBREW_VERSION: 4.4.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: 84c31175f11860129a9aaed40a13c549625e2db1
Last commit: 7 days ago
Core tap JSON: 08 Oct 06:42 UTC
Core cask tap JSON: 08 Oct 06:42 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 16.0.0 build 1600
Git: 2.47.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.0.1-arm64
CLT: 16.0.0.0.1.1724870825
Xcode: N/A
Rosetta 2: false
What were you trying to do (and why)?
Trying to remove stale deps. I ran "brew upgrade" and there were so many, what's "wangle"?
I've checked brew deps --tree --installed | view - and realised that was brought in by watchman.
I removed watchman, but that didn't remove edencommon.
So I removed edencommon, but that didn't remove fb303.
etc. etc.
What happened (include all command output)?
brew remove fbthrift Uninstalling /opt/homebrew/Cellar/fbthrift/2024.10.07.00... (881 files, 27.6MB)
brew autoremove [no output; retval OK]
What did you expect to happen?
for brew to remove the stale deps
Step-by-step reproduction instructions (by running brew commands)
Weirdly, if I `brew install watchman` again, it installs 3 packages (watchman, fb303, edencommon) and reuses the other deps.
When `brew remove watchman` it removes (edencommon,fb303,fbthrift) and doesn't remove the other deps.
It's as if my system state got weird, as if every dependency got marked as "explicitly installed".
P.S. doctor output doesn't say ready to brew maybe doctor output was changed? It does tell me that everything is working fine.
It's as if my system state got weird, as if every dependency got marked as "explicitly installed".
What's the output of brew leaves --installed-on-request? These are the formulae that are not used by other installed formulae, but will never be autoremoved, because you either did brew install for them at some point, or your Homebrew state "got weird" somehow.
Make a list of the formulae above that you're absolutely sure you never manually installed and you don't want on your system at this point, then:
brew tab --no-installed-on-request <list_of_non-manually-installed_formulae>
then a subsequent brew autoremove should do what you intended.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
brew leaves --installed-on-request includes weird things like mvfst (QUICK protocol dep of something, I don't even recognise the name, surely I didn't install that manually).
Same for ncdu flex bison and a few others.
brew tab work-around works just fine, thanks!
I was originally wondering if there was some way I could help diagnose how the system got into this state. Lemme know if there's something I can do on that end.
If you don't recall manually installing those formulae, one possibility is that you did manually upgrade them with brew upgrade $formula (or even brew upgrade $(brew ls)) some time in the past because that also marks $formula as installed on request.