Homebrew
| Task | Command |
|---|---|
| Update package index | brew update |
| Upgrade all installed packages | brew upgrade |
| Upgrade a specific package | brew upgrade <package> |
| Remove old versions of packages | brew cleanup |
| Check for problems | brew doctor |
| List installed packages | brew list |
| List outdated packages | brew outdated |
| List top-level installs (no dependents) | brew leaves |
| Show what depends on a package | brew uses --installed <pkg> |
| Uninstall a package | brew uninstall <package> |
Brewfile
Use a Brewfile to declaratively manage your installed packages, useful for bootstrapping a new machine.
# Dump currently installed packages to a Brewfile
brew bundle dump --file=~/Brewfile
# Install everything in a Brewfile
brew bundle install --file=~/BrewfileExample Brewfile:
brew "git"
brew "fnm"
brew "direnv"
cask "cursor"
cask "rectangle"Networking
Ports & Processes
Find what is listening on a port:
lsof -i :3000Kill whatever is on a port:
kill -9 $(lsof -ti :3000)