Value In Brief
All You Need To Know Explained In Brief

Free space in your Mac for Mobile Development

Mac OS X

If you are developing mobile apps for Android and/or iPhone and iPad, make sure to delete unused old software you installed in your journey to develop apps through months of updates and installations of libraries and tools.

If you do not want to clean your xcode on Mac manually, there are DevCleaner for Xcode which helps your delete obsolete/unwanted software tools/libs/cache/log.

Android Studio

clean up Gradle

Your Gradle Home directory contains wrapper, caches and daemons files. The more projects with diffferent gradle versions the more subdirectories within those three folders. You can delete all three directories. This saved me a cool ~10GB of space.

Just use these two commands.

cd ~/.gradle
rm -rf caches daemon wrapper

clean up Android SDK

Android System images are only used by emulators. If you use a real Android device during development for debugging, you no longer need them, so you can remove them all. This could easily save you 5GB doing this.

clean unwanted android sdk


1. Remove Old Simulators

As with Android the major culprit will be old simulators that take alot of space. The simulator files are by default located in ~/Library/Developer/Xcode/iOS/Device Support folder. You can delete old simulators using the following command.

xcrun simctl delete unavailable

2. Remove Cocoapod Caches

If you use Cocoapods in your projects you can clear them using this command. Don’t worry you can rebuild them later again.

rm -rf "${HOME}/Library/Caches/CocoaPods"

3. Clean up Archives,Logs and DerivedData folders

Folders like DerivedData can take up a significant amount of space too. DerivedData is generated during each build process. This contains intermediate build results,indexes that speed up time on each build. You can use the commands below to clear all that data.

rm -rf ~/Library/Developer/Xcode/Archives
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~~/Library/Developer/Xcode/iOS Device Logs/