On Wednesday, I saw a post widely shared about an unfortunate individual who lost half of their local library and was blaming Apple Music for automatically deleting their local files.

I sympathize, and I'm very glad this person had a backup of their music, but I want to dispel some FUD here: Apple Music has definite problems and its matching algorithms aren't great, but this is simply not how the service works. Apple Music should never automatically delete files off your primary Mac's hard drive unless you specifically delete them first.

How Apple Music on your primary Mac works

When you enable Apple Music on your original Mac, the service scans your music library and matches any tracks you own to its streaming library. This is so, when you're on a secondary device — like an iPhone, iPad, or other Mac — you can stream those tracks at their highest quality without having to download local files. These referenced files become part of your iCloud Music Library.

If you have tracks that aren't in Apple Music's library — say, personal recordings, for instance — they will be uploaded as-is to your iCloud Music Library, though songs encoded in ALAC, WAV, or AIFF will be uploaded as AAC 256kbps files for easier storage.

Once this matching and uploading process is complete, you have two libraries: your locally-stored library on your original Mac with all your old files, and an iCloud-stored library that you can access from other devices.

Where it gets confusing

On your original Mac, Apple Music will never delete songs without your knowledge. Your original library is scanned into iCloud, but your songs are yours, and Apple will not automatically delete them, or replace them with its own proprietary copies.

On an iPhone, iPad, or secondary Mac, this process is different: Any songs you play on those devices are sourced directly from your iCloud Music Library, and even if you download them locally, they can be removed from your device if your iPhone's storage space dips too low.

You can, however, download iCloud Music Library-sourced tracks on your Mac if you delete your original copies — and this is what I suspect may have happened to Vellum Atlanta author James Pinkstone's original library, possibly unknowingly.

When you press delete on a song in your iTunes Library with Apple Music or iTunes Match enabled, you'll see the following dialog:

@settern My theory is that this dialog box is causing a fundamental misunderstanding of what happens next. pic.twitter.com/ROYbw1WQzf — Jason Snell (@jsnell) May 5, 2016

If you choose "Remove Download," it will send the local file from your hard drive to your Trash, but leave the reference in your library — so that you can stream that track directly from iCloud Music Library. It won't delete the file until you empty your Trash.

This is great if you're on a laptop and want streaming access to your music library, but you don't want the hassle of having 40GB of music on your hard drive. But it should only ever be done on a secondary computer or secondary iTunes Library — never for your master library.

This is because iCloud Music Library's matching is far from perfect: It's been known to match live albums to studio ones, original songs to cover tracks, and more. If you delete your original files to save some space, you're putting those tracks at the mercy of iCloud.

Worse, iCloud Music Library only sticks around while you have an active Apple Music subscription: If you delete songs and replace them with iCloud versions — even if you re-download those versions to your hard drive — they'll disappear or become inoperable 30 days after you cancel your subscription.

As such, I've advised from the beginning to always keep a master copy of your original library when using streaming services that match your library, and back up that library before signing up for anything cloud-related.

Is this Apple's fault?

Sort of. iCloud Music Library is confusing as all hell, and it's been so since the first days of iTunes Match. That's absolutely Apple's fault.

In an ideal world, iCloud Music Library would work like Dropbox, or even iCloud Photo Library — whatever you upload is yours, it doesn't get "matched" to anything, and as long as you re-download everything before you cancel your subscription, you're fine. But DRM and downloading streaming tracks you don't have ownership rights to mucks things up. iCloud Music Library is always going to be complicated, and people are going to make mistakes because of it. And if they don't have backups, those mistakes might be costly.

There's also a possibility that some nasty bug wiped out Pinkstone's original library unintentionally. We haven't been able to reproduce this problem, however; Apple is currently talking with Pinkstone and investigating other reports from a small number of individuals.

Whatever the case, Apple Music was never designed to delete Pinkstone's source library, and it won't delete yours. That's simply not how the service works on your primary Mac. But if you're not aware of how iCloud Music Library stores copies of tracks, you may delete your local copies to save space, thinking you can get them back — and get screwed as a result.

For more information on iCloud Music Library and the Mac: