Skip to content

Instantly share code, notes, and snippets.

@seba47
Last active July 22, 2022 11:43
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save seba47/3f5727d6f357756781f29641f95a4a1a to your computer and use it in GitHub Desktop.
Save seba47/3f5727d6f357756781f29641f95a4a1a to your computer and use it in GitHub Desktop.
Freeing up space on Mac

Freeing up space on Mac

Last update: Jun 3, 2020

After working with "Your disk is almost full" notification for a long time, I decided to research and create a cleanup list.

This recipe was applied on a Xamarin developer environment and has freed up over 80GB space but It could be used in several context because there are shared folders between the different technologies.

Basics:

  • Check and try to remove unused/old Xamarin projects, there are some of them sized on more than 500Mb.

  • Check Downloads folder, sort by Size and remove unnecessary files.

  • Try to use only one Android simulator approach, VS android simulators or Genymotion. The first one are located on: $USER > .android > avd , and the second one are located on: $USER > .Genimotion.

Do you think I will share common tips?, well … NO! Let's gain more free space!

Juicy:

Path Action
$USER > .nuget > packages delete all folders, some of them will be restored but many of them not
$USER > Library > Caches delete all folders
$USER > Library > Logs delete all folders
$USER > Library > Developer > Xcode > iOS DeviceSupport delete all folder from unused iOS versions
$USER > Library > Developer > Xamarin > android-sdk-macosx delete folders, according to the sdk we are not using
$USER > Library > Developer > Xamarin > Archives delete all folders which contain date in their name, NOT remove Preferences folder
$USER > Library > Developer > Xcode > Archives delete all folders which contain date in their name
$USER > Library > Developer > CoreSimulator > Caches delete all folders
$USER > Library > Developer > CoreSimulator > Devices delete all folders - Warning - Xcode will recreate fresh instances there for you when you run the simulator again, but keep in mind you´ll lose data that´s written to the device like sqlite files, apps settings and the apps itself.

⚠️ Previous to delete folders/files from trash, check all emulators are still working fine. On my case I hadn't any issue, but some developers had faced issues like this.

I hope it has been useful for you!
If you'd have more tips or improvement to add, please let me know and I could update the file 💪🏽

@saamerm
Copy link

saamerm commented Jun 13, 2021

Seba thanks for sharing this. It would be helpful if you also mention the date you created or last edited this file :)

@seba47
Copy link
Author

seba47 commented Jun 14, 2021

Seba thanks for sharing this. It would be helpful if you also mention the date you created or last edited this file :)

Saamer, yes sorry, I did not add any date on the document, It is from Jun 3, 2020.
I will add this date to the document but also you could see this on the Revisions tab.

Thanks for your feedback 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment