How do I delete unwanted photos from iCloud to free up storage space?

I only want icloud to save a few of my pictures
To delete unwanted photos from iCloud, simply delete the photos from your Photostream or your iCloud Photo Library. That will remove the photos from iCloud and from your iCloud configured devices. As for you only wanting iCloud to save a few of your pictures', it doesn't work like that. It'll sync all of them or none of them. It may be beneficial for you to invest in an external hard drive.

Original thread: https://forums.imore.com/threads/how-do-i-delete-unwanted-photos-from-icloud-to-free-up-storage-space.336714/