App Package Manager
2020/04/26 Homebrew by jean tran
tl;dr: brew update && brew upgrade
After years of studies on Linux system and now using OSX as developer career. Here are some of my routines usage of Homebrew.
Why Homebrew? The idea is to have the lightest, cleanest system installation.
What does it do? From here it help to install specifics stuff that you need on demand (since every developer usage required different setup).
What kind of packaged could you find? Most if it's not all GNU softwares, in my usage most my CLI (Command-Line Interface) tools (git, ruby, python etc...).
Installation
In Linux Shell or OSX Terminal, you past the following command. The script will prompt explanation of what it does then pause before to do it.
Install
Uninstall
Apple Silicon ARM (updated 2021-01-03)
Make sure to handle this following warning: Warning: /opt/homebrew/bin is not in your PATH.
by adding export PATH=/opt/homebrew/bin:$PATH
in your .zshrc
or .bashrc
file.
Usage Routine
Commands
brew -v update
brew upgrade --force-bottle
brew cask upgrade
brew cleanup -s
Optionals commands to run helping for maintenance and to have more information with brew installation.
brew doctor
brew missing
Explanations
Fetch the newest version of Homebrew and all formulae from GitHub using git.
Basically upgrade is to upgrade outdated installed packages, --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.
Homebrew Cask provides a friendly CLI workflow for the administration of macOS applications distributed as binaries.
Remove stale lock files and outdated downloads. '-s' will only keep linked version diskspace saver. (FI: 'brew cask cleanup' is merged into 'brew cleanup').
Tips & Tricks
Relevant commands
brew update
- Update brew itself and fetches info about what's available for your other softwarebrew upgrade
- Upgrade/update everything you've installed with Homebrewbrew list
- Display software you've installedbrew cask list
- Display GUI apps you've installedbrew cask upgrade
- Update GUI apps you've installed (u/_zio_pane)brew outdated
- Display available updatesbrew upgrade whatever_package
- Upgrade only a specific thingbrew cleanup
- Remove old versionsbrew leaves
- Shows only packages you installed without their dependencies
Terminal Notifier
Terminal-notifier is a quite cool command-line tool to send macOS User Notifications, which are available on macOS 10.10 and higher. (available on Homebrew)
Installation
brew install terminal-notifier
Use cases
terminal-notifier -message "my custom notification message :)"
echo 'piped message ;)' | terminal-notifier -sound default
References
Thank you for reading. I suppose that you've got the main purpose the usage. Please contact me if you have any suggestions or ideas to make it better? Or did I miss something? I will be please to read about your feedbacks.
Last updated
Was this helpful?