Installazione
Installa Homebrew
/bin/bash -c "$(curl -fsSL \ https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew --version # verify installation
Post-Installazione (Apple Silicon)
# add Homebrew to PATH (Apple Silicon default) echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' \ >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
Percorsi di Installazione
/opt/homebrewPrefisso Apple Silicon (ARM)
/usr/localPrefisso Intel Mac
/home/linuxbrew/.linuxbrewPrefisso Linux
Gestione Pacchetti
Installazione e Rimozione
brew install git # install formula brew install [email protected] # install specific version brew uninstall git # remove formula brew reinstall git # reinstall formula
Aggiornamento
brew update # update Homebrew itself brew upgrade # upgrade all packages brew upgrade git # upgrade specific package brew pin git # prevent auto-upgrade brew unpin git # allow upgrade again
Elenco Installati
brew list # all installed formulae brew list --cask # all installed casks brew leaves # top-level (not dependencies) brew deps git # show dependencies of git
Ricerca e Info
Ricerca Pacchetti
brew search postgres # search by name brew search --cask chrome # search casks only brew info git # package details brew home git # open homepage in browser
Campi Info
Name / VersionNome del pacchetto e versione installata
DependenciesPacchetti richiesti
ConflictsPacchetti incompatibili
CaveatsNote post-installazione (PATH, config)
AnalyticsConteggio installazioni (ultimi 30/90/365 giorni)
Servizi
Gestione Servizi
brew services list # all services + status brew services start postgresql # start and auto-launch brew services stop postgresql # stop service brew services restart nginx # restart service brew services run redis # start without auto-launch
Note sui Servizi
startAvvia subito + registra all'avvio
runAvvia subito soltanto (senza auto-start)
stopFerma e deregistra dall'avvio
restartFerma poi avvia
listMostra tutti i servizi e il loro stato
LogsControlla ~/Library/Logs/Homebrew/
Cask
Gestione Applicazioni GUI
brew install --cask firefox # install GUI app brew uninstall --cask firefox # remove GUI app brew upgrade --cask # upgrade all casks brew list --cask # list installed casks
Cask Comuni
google-chromeBrowser Chrome
visual-studio-codeEditor VS Code
dockerDocker Desktop
iterm2Terminale iTerm2
slackMessaggistica Slack
rectangleGestione finestre
1passwordGestore password
raycastLauncher (sostituto di Spotlight)
Tap
Repository di Terze Parti
brew tap # list tapped repos brew tap hashicorp/tap # add a tap brew untap hashicorp/tap # remove a tap brew install hashicorp/tap/terraform # install from tap
Tap Popolari
homebrew/caskApp GUI (inclusa per default)
homebrew/cask-fontsFont: brew install --cask font-fira-code
homebrew/bundleSupporto Brewfile (Bundler per Homebrew)
hashicorp/tapTerraform, Vault, Consul
Brewfile (Bundle)
brew bundle dump # generate Brewfile brew bundle install # install from Brewfile brew bundle cleanup # remove unlisted packages
Pulizia
Liberare Spazio su Disco
brew cleanup # remove old versions brew cleanup -s # also remove cache brew cleanup --prune=all # remove all cached downloads brew autoremove # remove unused dependencies
Diagnostica
brew doctor # check for issues brew config # show Homebrew config brew missing # list missing dependencies du -sh $(brew --cache) # check cache size
Pattern Comuni
Flussi di Lavoro Quotidiani
Aggiornamento mattutinobrew update && brew upgrade && brew cleanup
Configurazione nuovo Macbrew bundle install da un Brewfile
Esporta configurazionebrew bundle dump --file=~/Brewfile
Controlla salutebrew doctor
Trova cosa occupa spaziobrew list --formula | xargs brew info
Disinstalla + dipendenzebrew uninstall pkg && brew autoremove
Esempio di Brewfile
# ~/Brewfile tap "homebrew/bundle" brew "git" brew "node" brew "python" cask "visual-studio-code" cask "docker"