Freeing SSD memory on Macbook

It has been constant pain to keep the the ‘Available Free Space’ to requisite levels on my Macbook Air. I really don’t need Macbook Pro and the cost is not justified. Engineers at Apple have written very efficient software and Macbook Air suffices most computing needs. Simultaneously I use Xcode and Android Studio without issues. I am yet to try Adobe Photoshop and alike. I have found some useful and easy way for managing the memory on SSD that I was searching for a long time. I hope it will be of little help to you.

Macbook Air has always kept me hooked onto it and I chose to use Macbook Air primarily because:

  • Light weight
  • SSD over hardisk
  • Longer battery life
  • Expandable SD drive 🙂
  • Lighter on power consumption
  • Over a period of time, your disk space is eaten up by the constant free updates, Photos, Applications and more. Since I use it for Xcode and Android Studios, I used to run out of memory soon. I didn’t like the idea of using external hard-disk for the bane of carrying it. Instead I liked Hyperdrive that nicely snapped to the SD drive on my Macbook Air.
    I amended 128GB for MacbookAir and was sporting it all the way. Very soon Xcode, Eclipse and Android Studio became home to this drive. Saw my free space on SSD reaching 30 GB free and continued my work. After about 3-4 months I had used almost all of 30GB and was amused at what is making home in my SSD. The magnetic bytes on the home drive needed certain planning.

    Here I am sharing the learning I had in freeing up the space by almost 50%. Yes you read it right. While I am writing this I had free space of 56GB on 120 GB hard-disk. Well about 10-12 GB is used by the OS and other libraries that can’t be removed without bricking.

    1. Press holding Shift+Command+G, in your Finder, you will get a small dialog box to type path. G above is for ‘Go To’.
    2. In that type

      /Users/username/Library

    Here you shall see many folders that are fed with your precious SSD bytes. Over a period of time, depending on Xcode settings, its updates and more, about 30GB was makeup by it. I didn’t want to perturb anything and closed Xcode and Android Studio. Then copied the entire ‘Xcode’, ‘Android’ to my external drive. External drives are mounted and they can be found under /Volumes/ directory by default usual with a name as the external disk itself. Same thing happened with Android Studio as well.
    Apart from these two directories, you will also have ‘Application Support‘ directory that can be deleted as well. General guidance is that hunt down the largest duck first.
    Mail is another folder that you may want to get rid of. Especially true, if you are using Gmail or something like that where you have downloaded all your mails and its attachments. Copy this folder in its entirety to external drive. Better to close your ‘Mail’ application. Perform following steps for every folder you have removed if you don’t want to disturb the applications.

    1. Open Terminal application
    2. Type ‘cd /Users/username/Library’ and press ‘Enter’. This is changing directory to the ‘Library’ folder.
    3. Now type ‘ln -s /Volumes/external-disk-name/Xcode Xcode’. Observe the blank space between Xcode. This will create a link folder in the ‘Library’ folder.

    Repeat the above steps for remaining folders that you have moved. Now you re-launch the applications and see that they are still working the same. This has worked on Macbook Air with El Capitan version of OS. The directory structure if changes then above instructions may need to be modified to suit.

    In the Xcode folder that you have moved, you may delete ‘DerivedData’ folder as it contains result of all build that you have done until then. It is also advised to delete corresponding application folders under ‘DerivedData’.
    In addition, I have also deleted ‘iOS DeviceSupport’ directory to free up further memory on the external disk.

    Let me know your feedback, suggestions and input to enhance this for others.

    Let the world know...Share on Facebook16Share on Google+0Tweet about this on TwitterShare on LinkedIn0

    Leave a Reply

    Your email address will not be published. Required fields are marked *