Cleaning Up Simulators with AI
How I saved hundreds of gigabytes of space by asking AI to delete old iOS simulators.
How I saved hundreds of gigabytes of space by asking AI to delete old iOS simulators.
As an iOS developer, every minor iOS update (18.3 from 18.2, that kind of thing) downloads a new simulator for each device you're simulating. If you keep the last three iPhone sizes and three from the year before, plus eight iPads, you commonly end up with 14 simulators that get updated on every minor iOS or iPadOS bump.
Do that for a year or two and you can have a hundred simulators you've never opened. Deleting them by hand is tedious. Local AI on your machine can list what to remove and save hundreds of gigabytes without you auditing every runtime yourself.
My cleanup prompt usually looks like this:
Please list all the iOS simulators I have installed. Then, create a script to delete all of them except for the latest version for each device class, and one older version from each major iOS release.
That often recovers a lot of space.
Same idea for disk hogs outside simulators:
Find all files larger than 2 GB that have not been opened in the last 6 months. List them for me so I can decide which ones to delete to free up space.
I tell the AI to keep the latest simulator per device class plus one older version from each major iOS release. The 2 GB prompt catches one-off files I forgot were sitting on the drive.
If you're reading this later, you can do this for free without a paid account. Gemini CLI runs these maintenance tasks from your terminal, talks to your local file system, and can execute the cleanup scripts.