Question: how to delete photos from icloud but not iphone?
Answer: The only way to keep those photos and safely delete them from the device is to download the photos to your computer and then delete them from the device. When you turn on iCloud Photo Library, your photos and videos automatically upload to iCloud. They're not duplicated in your iCloud backup.