Skip to content

Homebrew

https://brew.sh/

Package manager for macOS (primarily) and Linux

Setting / environment variable Impact Trade-offs
HOMEBREW_UPDATE_TO_TAG=1 Keeps the Homebrew client on stable releases rather than unreleased main. Latest features cannot be previewed.
HOMEBREW_FORMULA_BUILD_NETWORK=deny Prevents source-build scripts from accessing the network. Only affects source builds. They must use resources Homebrew fetched beforehand.
HOMEBREW_FORMULA_POSTINSTALL_NETWORK=deny Prevents formula post-install scripts from downloading or exfiltrating data. Can break formulae with legitimate network-dependent post-install steps.
HOMEBREW_NO_UPDATE_REPORT_NEW=1 Decrease verbosity User is not informed about packages added to the repo.
HOMEBREW_NO_ENV_HINTS=1 Decrease verbosity User is not informed about optimization opportunities.
HOMEBREW_CLEANUP_MAX_AGE_DAYS=30 Save space Rolling back versions might require downloads more often.
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=7 Save space Rolling back versions might require downloads more often.
HOMEBREW_NO_UPGRADE_QUIT_CASKS=1 Avoid losing data - allows me to update without immediate reboot. ?
HOMEBREW_VERIFY_ATTESTATIONS=1 Security hardening Requires GitHub CLI (formula gh) to be installed.

List most recently installed GUI apps (casks)

Section titled “List most recently installed GUI apps (casks)”
Terminal window
brew info --json=v2 --installed | python3 -c '
import json, sys
from datetime import datetime
apps = json.load(sys.stdin)["casks"]
for app in sorted(apps, key=lambda a: a.get("installed_time") or 0, reverse=True):
t = app.get("installed_time")
date = datetime.fromtimestamp(t).strftime("%Y-%m-%d %H:%M") if t else "Unknown date"
print(date, app["token"])
'