22

I updated macOS to Big Sur for my late 2016 MacBook Pro.

When I check the storage:

enter image description here

Xcode Caches takes a huge size of storage. I deleted it and it will show up again.

Why is it so huge? Can I delete them and how to delete them?

Adam Richardson
  • 2,518
  • 1
  • 27
  • 31
Elvin
  • 363
  • 1
  • 2
  • 8

2 Answers2

7

They are not caches. But simulators for various devices like AppleTV, Watch, and iPhones.

You can delete them from the app.

Xcode Simulator: how to remove older unneeded devices?

https://apple.stackexchange.com/questions/5353/how-can-i-figure-out-whats-slowly-eating-my-hd-space

puio
  • 1,208
  • 6
  • 19
  • At one second I think it works but now it shows up and occupies the storage by 9.25GB again.. ! Thanks for the advice anyway and I'll still try to figure out WHERE the storage is going to, LOL – Elvin Jan 02 '21 at 16:41
  • @Elvin watch out for your bandwidth. https://apple.stackexchange.com/questions/377220/xcode-simulator-constantly-download-something Also, actual size of Xcode may differ from what finder/ about this mac shows. Consider using something like disk inventory X to analyse what's inside the ~/Library/Developer and Xcode.app. Or plain old `du` – puio Jan 03 '21 at 10:46
  • https://apple.stackexchange.com/questions/5353/how-can-i-figure-out-whats-slowly-eating-my-hd-space – puio Jan 03 '21 at 10:48
  • I tried everything I get for deleting Xcode Caches and it keeps coming back.. – Elvin Jan 03 '21 at 13:18
  • Have you tried seeing the insides of Xcode.app and ~/Library using disk inventory ? – puio Jan 03 '21 at 14:48
2

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. To delete those caches, you can use CleanMyMacX. 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.

Gwamaka Charles
  • 1,479
  • 9
  • 12
  • 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..!! Are these HUGE caches necessary? If it's a yes, I'll just pass over this question.. anybody? – Elvin Apr 07 '21 at 10:38
  • They are necessary for the performance of the simulators, just so it takes a while to complete the first retrieval of all necessary files to run the first iteration of your app and then it uses the cached files for the subsequent iterations. – Gwamaka Charles Apr 07 '21 at 11:09
  • 1
    I see, thanks for all the helpful informations. – Elvin Apr 07 '21 at 11:10