If you've subscribed to either Apple Music or iTunes Match, you are using iCloud Music Library. It is Apple's service for storing your personal music library online. The service will match your tracks to songs listed on the iTunes Store, or if there's no match, upload those tracks directly.
The tracks that you have in your iCloud Music Library can be streamed and downloaded — DRM-free — to up to ten other registered devices in your possession, as long as you log in using the same Apple ID and you turn on iCloud Music Library.
But there are times when you need turn off the library. For example, if you want to sell or pass on your device to someone else, the last thing that you want is a total stranger having access to your music library.
Actually, turning on or off iCloud Music Library is as simple as ticking or unticking a box.
On your PC, open iTunes and go to the Edit > Preferences menu.
After the Preferences window pop out, go to the General tab and find iCloud Music Library check box. Uncheck the box to disable the library, or check the box if you want to do the opposite.
Don't forget to click the OK button to confirm your action.
And that's about it if what you want to do is just to turn off iCloud Music Library on PC. But if you want to make sure that no one will have access to your library from the computer, you also need to log out from your account.
To do that, go to Account > Sign Out menu to log the computer out from your Apple ID.
The last step is to make sure that you left none of your library content on that computer. Open the File > Library > Update iCloud Music Library menu to clean everything.
But if you've disabled the library and logged out your account, you might not see this menu. It means that you've successfully turned off iCloud Music Library on PC.
Turning off iCloud Music Library will clean out the content of your local library, the one on the computer, from the content that you have on the cloud. But that doesn't mean that you should lose your phone data.
To make sure there's no harm done to your phone data, you can protect your iPhone data with the help of iCareFoneM or iCareFone for Mac, an all-in-one iOS systemcare utility. Other than doing the backup and restore of the iOS device, this tool can also transfer music and photos between computer and iPhone, clear junk files and speed up iPhone and iPad, block in-app ads, and fix iOS stuck.