With my head held low with shame, I publicly admitted last week that I'm a digital hoarder. My once blazingly fast Mac is now left with just 100GB of a 1TB drive left. I've already shifted all my downloads onto a NAS, but now I'm left with a legacy of nearly 20,000 photos and MP3s, which together add up to at least 200GB of space.

I'm hoping to upgrade to an SSD, but at this rate it's looking quite difficult. Today, I'll see whether it's possible to shift these completely off to a network drive - my Synology NAS should be perfect for this, but you can also use an external hard drive if you lack network storage.

Before we begin: Backup

I can't promise this is going to work for you and not completely screw up your libraries – so before you even attempt this today, do a full, complete and bootable backup of your drive. If you have Time Machine setup and working you shouldn't lose any data, but it's often easier when you've made a huge error to just clone your Mac back to how it was before.

If you're not already backing up, now would be a great time to get started with the ultimate triple backup system.

I'd also suggest not shifting your iTunes and iPhoto libraries to a network unless your NAS device has backup capabilities itself - the Synology DS413j I'll be using has a hybrid RAID with one disk redundancy, so I'm trusting it not lose all my data.

Locate Libraries and Check Size

Your iTunes library can found under Music > iTunes. Right click the folder and give it a moment to count the file sizes – mine totalled nearly 125GB – but bear in mind this will include any downloaded apps for your iOS devices too. Don't manually edit anything within the folder structure - always let the native apps manage these libraries.

itunes-library-size

The iPhoto/Aperture library – now unified – can be found in your Mac's Pictures folder. This folder is a little special - you can't "open" it to view the underlying structure (well you can, but just don't, mmmkay?). Click on the folder once and the total size should be shown on the right information panel.

iphoto-library-size

Moving iPhoto Library

Assuming you want to keep using iPhoto or Aperture as your photo management solution, you'll be moving the entire iPhoto Library "file" as is. Make sure iPhoto and Aperture are closed, make an appropriate shared folder if you haven't already, then simply drag and drop the library to your NAS or external drive.

moving

Once it's complete, you can double click to open the library in iPhoto '08 or later and it will remember the location for future. For older versions, hold down the option key while launching iPhoto to open the library selection dialog, then navigate and choose your newly moved library.

No more changes needed for iPhoto, you're all set - provided your NAS is present and functional on your network or the external drive you used is connected, iPhoto should function as normal.

Note: Scott got in touch to tell us he had problems with this causing data loss - the issue arises because the iPhoto library must be stored on an HFS+ formatted volume. His solution was to create a sparse bundle disk image and place that on the NAS storage instead - instructions on how to do that can be found here.

Moving iTunes Library

There's a number of ways to go about moving the iTunes library.

  1. The simplest way is simply to move the entire library content and let iTunes manage as before. This is what we'll be doing today, so as to keep all that juicy metadata and artwork intact.
  2. You may also choose to only copy the raw files, then re-add them to a new iTunes library with the option to leave them in their original location (by default, iTunes will attempt to copy them back into it's own library again, defeating the entire point of our exercise today). This would be best if you have other apps accessing your library and would like to maintain your own folder structure, but bear in mind you will lose all the metadata if you do this - play count, ratings etc.
  3. Your NAS may also have it's own iTunes server, which will create an iTunes compatible network share as well as extra features it might offer (like remote playback over the internet). You will need to let your NAS handle the library though, and iTunes will merely stream it.

Start by reorganising your library - especially if you've kept the same library for many years now and possibly even moved between operating systems. Choose File > Library > Organize > Re-Organize (not Consolidate) and allow it to sort out your files.

organize

Update Library Location

Create an iTunes folder on your NAS or external drive, and update the iTunes preferences for your existing library to that new location by going to iTunes > Preferences > Advanced and clicking Change.

Next, select File > Library > Organise > Consolidate.

consolidate

This will begin the process of copying your music to the new library location. If you have a lot of files, this is going to take a very long time.

When you're done, you can safely delete the iTunes Media folder on your local machine. At this point, you may also choose to move your library files (.ITL and .XML) to the NAS or external drive too, but I don't suggest doing so as these are far smaller and keeping them locally will improve performance since they contain the actual index of files.

You may also face some issues when copying to a NAS. EXT3 filesystems are case sensitive, and filenames have 255 character limit. Unfortunately, there's not an awful lot you can do other than manually fixing these and trying again. If you are using an external drive, a HFS+ file system will provide best results.

Map the Network Share So It Mounts on Boot (NAS method)

Assuming you moved your libraries to a NAS and that the drive is already mounted (which it should be if you've been copying things to it) you'll want to make sure your newly networked media boots with your Mac. Open up the Users & Groups panel from System Preferences, click Login Items and add a new login item for your own user, and select the network drive.

This should now cause your Mac to mount the network share automatically on restart so your library doesn't break. If you used an external drive, you'll need to ensure the drive is physically connected each time instead.

auto-mount

Done!

That's it, all done. Now - I really suggest you don't go filling up all that space again, but instead consider swapping out your drive for a smaller SSD for much improved performance. Here's how I added one to an old Macbook Pro.

Got any more tips for freeing up space? Let me know in the comments, and share if you appreciate this tutorial!