MacOS: Cannot delete "Xcode Caches" under System Information > Storage Management
Sebastian Wright
I am using a 2020 M1 Macbook Air on Monterey 12.3.1.
When I go to:
About this Mac > Storage > Manage > Developer
I see Xcode Caches taking up 4.85 GB space.
When I click delete, a pop up shows saying "Are you sure you want to delete Xcode Caches? This item will be deleted immediately, freeing up 4.85GB of storage. You can't undo this action."
I click "Delete" and then nothing happens. The item still stays there and doesn't delete. I've tried deleting it multiple times. I've also tried restarting my Mac and it's still there.
How can I purge these files from my computer? I also tried going into Xcode and deleting all of the simulators but that didn't change the amount of storage being taken up.
31 Answer
The postWhy is Xcode Caches so hugehas some more information:
That whole file that you see labeled Xcode Caches listed within the Developer tab after you've decided to view the storage management, is not all comprised of Caches. It has iOS simulators and inside there are caches of the simulators.
The folder itself is probably located at ~/Library/Developer/Xcode/or ~/Library/Developer/CoreSimulator/Caches,
but deleting everything may not be a good idea.
There are some things you can safely delete but there is plenty in there you probably want to keep.
A utility that could help in safely deleting the data isCleanMyMac X. The advice in the same post says:
Open the app, and select space lens then navigate to the Developer folder within the Library folder. Select CoreSimulator and inside you'll find the Caches folder which is the one that you should delete.
However, this might not be worth the trouble, as by this comment:
According to CleanMyMacX (it's a great app by the way), the exact path for these HUGE Xcode caches is "~/Library/Developer/CoreSimulator/Caches". I deleted everything in it, then I started to use Xcode to run some projects I needed. After a while, these HUGE caches are back..!!