Deleting photos from my iPhone - and keeping them in iCloud I had the Apple Helpdesk helping me to delete all the photos I had on my iPhone.
I had to go to Settings and switch off the iCloud Photo Library and my Photo Stream.
Well, I thought that would work but it only deleted 1/2 of the photos. I still have 17,111 photos on it.
The question now is: how do I get the rest off? I tried to delete some, but then I get the notification that the photos will be deleted from all my devices.

What to do?
I’ve experienced something similar and I always suspected that they were the photos on the phone before iCloud Photo Library was enabled. The only way I know to delete them is manually or through a manual sync on my Mac using Image Capture which gives you the option to delete all the photos copied to the Mac. Note that I’m syncing to a folder on the Mac, not to Photos.

I’m not sure what’s supposed to happen but I was trying to force my iPhone to only have optimized copies, so I turned off iCloud Photo Library, deleted the photos that remained, and then turned iCloud Photo Library back on. Photos proceeded to delete all the photos I’d manually deleted from my iPhone from iCloud Photo Library. That was unexpected but not a huge crisis because I restored them from “Recently Deleted”. However, I did learn not to assume I understood iCloud Photo Library well enough to think I could bend it to my will.

After those experiences, if I wanted to take a device completely out of iCloud Photo Library, I’d erase it and rebuild it form scratch rather than a backup. Painful but the only way to be sure.