Closed tgaeta closed 1 month ago
This behavior occurs consistently with every terminal command, including brew --version, brew doctor, etc. [...] The brew --version command outputs the version number correctly without the cleanup message.
So does brew --version
work correctly, or not? I'm betting it fails just like all the others, but please confirm one way or another.
Also, what's the output of type brew
?
@gromgit Sorry for not mentioning in the original bug report, but I also ran those commands as well:
brew --version
Homebrew 4.3.10
Usage: brew cleanup [options] [formula|cask ...]
Remove stale lock files and outdated downloads for all formulae and casks, and
remove old versions of installed formulae. If arguments are specified, only do
this for the given formulae and casks. Removes all downloads more than 120 days
old. This can be adjusted with HOMEBREW_CLEANUP_MAX_AGE_DAYS.
--prune Remove all cache files older than specified
days. If you want to remove everything, use
--prune=all.
-n, --dry-run Show what would be removed, but do not
actually remove anything.
-s, --scrub Scrub the cache, including downloads for even
the latest versions. Note that downloads for
any installed formulae or casks will still
not be deleted. If you want to delete those
too: rm -rf "$(brew --cache)"
--prune-prefix Only prune the symlinks and directories from
the prefix and remove no other files.
-d, --debug Display any debugging information.
-q, --quiet Make some output more quiet.
-v, --verbose Make some output more verbose.
-h, --help Show this message.
Error: invalid option: -l
type brew
brew is /opt/homebrew/bin/brew
Usage: brew cleanup [options] [formula|cask ...]
Remove stale lock files and outdated downloads for all formulae and casks, and
remove old versions of installed formulae. If arguments are specified, only do
this for the given formulae and casks. Removes all downloads more than 120 days
old. This can be adjusted with HOMEBREW_CLEANUP_MAX_AGE_DAYS.
--prune Remove all cache files older than specified
days. If you want to remove everything, use
--prune=all.
-n, --dry-run Show what would be removed, but do not
actually remove anything.
-s, --scrub Scrub the cache, including downloads for even
the latest versions. Note that downloads for
any installed formulae or casks will still
not be deleted. If you want to delete those
too: rm -rf "$(brew --cache)"
--prune-prefix Only prune the symlinks and directories from
the prefix and remove no other files.
-d, --debug Display any debugging information.
-q, --quiet Make some output more quiet.
-v, --verbose Make some output more verbose.
-h, --help Show this message.
Error: invalid option: -l
I think this is a one-time thing. No one else reported it. I tried downgrading but still got the Error: invalid option: -l
. Yesterday, everything was fine. This morning, I sat down to work, and the error came up.
OK, so your brew
isn't a wrapper or something else that's running brew cleanup
with improper args. That leaves:
brew update-reset
should take care of that, orls
as well) it's being run by your shell before each prompt - check $PROMPT_COMMAND
(bash) or your precmd
-related hooks (zsh)brew update-reset
indeed resolved this issue for me. Thank you @gromgit 🙇
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
I was trying to use various commands for normal day-to-day operations:
cd sandbox
code .
brew config
What happened (include all command output)?
After every command, regardless of its purpose or success, the following message appears:
What did you expect to happen?
I expected commands to execute normally without this cleanup message appearing every time.
Step-by-step reproduction instructions (by running
brew
commands)