# Mac Maintenance

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

- Skill: `mouadja02/mac-maintenance` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mouadja02/mac-maintenance`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mouadja02/mac-maintenance/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mouadja02 (https://skillmd.com/u/mouadja02)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mouadja02/mac-maintenance

---


# Mac Maintenance

> **Attribution:** Sourced from [steipete/agent-scripts](https://github.com/steipete/agent-scripts) by [Peter Steinberger](https://github.com/steipete).

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

## Run

### 1. Homebrew update

```bash
brew update && brew upgrade
```

### 2. Pull repos

```bash
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)

```bash
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`

