This wikiHow explains how to disable iCloud Music Library on an iPhone, iPad or computer. This library is only available if you are subscribed to Apple Music and disabling this feature will remove from the paired device (your iPhone, for example) any songs downloaded from Apple Music.
Steps
Method 1 of 2: iPhone

Step 1. Open the settings app
Press the app icon; it is a gray square containing a set of gears.

Step 2. Scroll to Music
You should find this option about halfway down the settings page.

Step 3. Press the green switch of "iCloud Music Library"
It is located at the top of the screen. The switch will turn gray
If you don't see the "iCloud Music Library" option, it means that you are not subscribed to Apple Music and therefore cannot deactivate (or activate) the library

Step 4. Press OK when prompted
This will confirm your decision and the library will be deactivated. All songs downloaded from Apple Music will be removed from iPhone; you can download them again at any time by reactivating the "iCloud Music Library".
Method 2 of 2: Desktop

Step 1. Launch iTunes
Click or double-click the iTunes icon, depicting a multicolored musical note on a white background.
If you are prompted to install an update, do so before proceeding further

Step 2. Click on Edit
This is one of the menu items at the top of the iTunes window. A drop-down menu will appear.
On a Mac, you'll go and click iTunes in the upper left corner of the screen.

Step 3. Click on Preferences…
It's at the bottom of the drop-down menu. The preferences window will open.

Step 4. Click on the General tab
It is located at the top of the preferences window.

Step 5. Uncheck the "iCloud Music Library" box
You should see it at the top of the window.
- If there is no check mark, the library is disabled on your computer;
- If this box is not present, it means that "iCloud Music Library" is not available for your account.

Step 6. Click OK
It's at the bottom of the preferences window. This will record your changes and remove all downloaded Apple Music songs from your library.