How can I delete photos from my iPhone but keep them in iCloud?
Apple’s solution is to manage your storage for you. Under Settings → Photos &amp; Camera, select to Optimize iPhone Storage.

As long as you have enough local storage, photos will remain on your device. When your iPhone needs the space, high-resolution versions of your photos will be removed from your iPhone; all that is kept then is thumbnails, until you decide to view the photo again.

At that point a device-optimized version of the photo is downloaded from iCloud. A full-resolution version won’t be downloaded until you decide to edit or share the photo.

iCloud Photo Library is a photo-sync service, rather than a backup service, which is why deleting a photo anywhere deletes it everywhere. What you see on your device is what you see in iCloud is what you see on all your devices connected to the service.