Ask an AI to Clean Up Your Mac: Storage Housekeeping with Codex and Claude Code
The most useful unexpected application I have found for AI coding tools recently is having them help clean up storage on a Mac. Anyone with Codex or Claude Code can try it today, and it does not need a particularly capable model.
One sentence is enough to start
When a Mac runs short of space, the traditional approach is to squint at the storage breakdown in About This Mac, guess where the weight is, and go hunting by hand.
Not anymore. Tell Codex or Claude Code that you want help clearing space on your Mac and it will find the large files and the likely-unnecessary ones and give you a list. This is work only an agentic tool with file access can do.
It suggests where things should go, not just what to delete
What makes this worthwhile is that it does not stop at a list of deletion candidates. It distinguishes between a cache that is safe to remove and something better moved to an external drive, according to what the file actually is.
In my case, two things accounted for most of the space:
- Cache files that various applications had been accumulating
- A large collection of images kept locally so that a production site could be reproduced in a local development environment, which I moved to an external drive
The second one is a change in how I work, and it was talking it through with the AI that got me to the decision.
Confirm deletions yourself
Deleting files can be irreversible. Even when delegating to an agent, look at what is about to be removed before it happens. The safe division is: the AI lists candidates and explains them, a person decides what goes. Having a backup in place first makes it safer still.
Worth doing before you buy more storage
With SSD prices where they are, plenty of people would rather run the next Mac on less storage than more. I keep files locally for site work and music production, and periodic cleanups with AI help are what make a 1TB machine viable for me. It is also worth doing before a replacement machine arrives.
This article is adapted for AI Jiten from testing notes originally published on the author’s blog, Delaymania.