Mac Maintenance

macOS upkeep: brew update/upgrade, pull clean repos, empty Trash.

mouadja02 decb2c1 935 B Updated

File contents

Mac Maintenance

Attribution: Sourced from steipete/agent-scripts by Peter Steinberger.

Use when asked for Mac cleanup, maintenance, or package/repo refresh.

Run

1. Homebrew update

brew update && brew upgrade

2. Pull repos

for repo in ~/Projects/*/.git; do
  dir=${repo:h}
  git -C "$dir" status --short --branch
  git -C "$dir" pull --ff-only
done

Skip dirty repos unless explicitly asked to handle them. Report skipped paths.

3. Empty Trash (macOS)

osascript -e 'tell application "Finder" to empty trash'

Summary

Finish with terse counts:

  • brew: N packages upgraded / already current
  • repos: N pulled / N skipped (dirty) / N failed
  • trash: emptied / failed

mouadja02/skills/tree/main/skills/devops/mac-maintenance commit decb2c18ea

Frequently asked questions

npx skillmds@latest add mouadja02/mac-maintenance