Linux command
brew-upgrade 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Upgrade all installed formulae and casks
brew upgrade
Upgrade a specific formula
brew upgrade [formula]
Upgrade a specific cask
brew upgrade --cask [cask]
Dry run showing what would be upgraded without actually upgrading
brew upgrade --dry-run
Also upgrade casks that manage their own updates or track the latest version
brew upgrade --greedy
Upgrade with verbose output showing verification and post-install steps
brew upgrade --verbose [formula]
说明
brew upgrade upgrades outdated casks and outdated, unpinned formulae using the same options they were originally installed with. Without arguments, it upgrades all installed packages. With arguments, it upgrades only the specified packages. Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for outdated dependents and dependents with broken linkage, respectively. Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the upgraded formulae or, every 30 days, for all formulae.
参数
- --formula, --formulae
- Treat all named arguments as formulae. If no named arguments are specified, upgrade only outdated formulae.
- --cask, --casks
- Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks.
- -n, --dry-run
- Show what would be upgraded, but do not actually upgrade anything.
- -v, --verbose
- Print the verification and post-install steps.
- -q, --quiet
- Make some output more quiet.
- -d, --debug
- If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
- --display-times
- Print install times for each package at the end of the run. Enabled by default if $HOMEBREW_DISPLAY_INSTALL_TIMES is set.
- --ask
- Ask for confirmation before downloading and upgrading formulae. Print download, install and net install sizes of bottles and dependencies. Enabled by default if $HOMEBREW_ASK is set.
- -f, --force
- Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask).
- -g, --greedy
- Also include casks with auto_updates true or version :latest. Enabled by default if $HOMEBREW_UPGRADE_GREEDY is set.
- --greedy-latest
- Also include casks with version :latest.
- --greedy-auto-updates
- Also include casks with auto_updates true.
- --fetch-HEAD
- Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.
- -s, --build-from-source
- Compile formula from source even if a bottle is available.
- --force-bottle
- Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation.
- --skip-cask-deps
- Skip installing cask dependencies.
- --overwrite
- Delete files that already exist in the prefix while linking.
- --keep-tmp
- Retain the temporary files created during installation.
FAQ
What is the brew-upgrade command used for?
brew upgrade upgrades outdated casks and outdated, unpinned formulae using the same options they were originally installed with. Without arguments, it upgrades all installed packages. With arguments, it upgrades only the specified packages. Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew reinstall will be run for outdated dependents and dependents with broken linkage, respectively. Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for the upgraded formulae or, every 30 days, for all formulae.
How do I run a basic brew-upgrade example?
Run `brew upgrade` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --formula, --formulae do in brew-upgrade?
Treat all named arguments as formulae. If no named arguments are specified, upgrade only outdated formulae.