Guides
Short answers for when your Mac runs low on memory or disk during development. Each one gives the Terminal commands first, so you can fix it by hand. Start with Free up RAM on a Mac used for development if you don't know what's holding it.
Memory
- Free up RAM on a Mac used for development
Check whether your Mac is really short on memory, find the dev tools holding it, and why RAM cleaners and purge don't help.
- What the dev processes in Activity Monitor are
qemu-system-aarch64, com.apple.Virtualization.VirtualMachine, java, launchd_sim, SWBBuildService, a process named 2.1.309: what each one is and how to stop it.
- How much RAM a Mac needs for development
16, 24 or 32 GB: add up what your iOS, Android, web or Docker work keeps running at once, with typical sizes for each tool.
Ports and dev servers
- Kill the process on port 3000 on a Mac
Find what's listening on port 3000 with lsof and stop it with kill, why Next.js and Vite move to 3001, and what holds ports 5000 and 7000.
- Find dev servers your AI coding agent left running
Claude Code, Cursor, Codex and Gemini CLI leave dev servers up. List them, see which agent started each and why it outlived the session, and stop them.
Simulators, emulators and daemons
- iOS Simulator using too much memory
Find every booted simulator, including the ones with no window, shut them down with xcrun simctl, and what SimulatorTrampoline is.
- Android emulator slow on a 16 GB Mac
Why the emulator crawls on 16 GB, and the image, RAM and daemon settings that make it usable.
- Gradle daemon memory on a Mac
See how much RAM the Gradle and Kotlin daemons hold, stop them, and cap them in gradle.properties.
- Docker using too much memory on a Mac
Why the Docker VM holds gigabytes with nothing running, what com.docker.backend and exit code 137 mean, and how to cap Docker Desktop, OrbStack and Colima.
Disk
- Delete old simulator runtimes in Xcode
List simulator runtimes with xcrun simctl, see where they live and how much space they take, delete the old ones, and clear Xcode's other leftovers.