How to store iCloud Photo Library only in the cloud
If you don't want any of your iCloud pictures on your computer.

Go to System Preferences > iCloud and turn off iCloud Photo Library. If you click on the Options button in the category, you can turn off single parts of iCloud and keep others on.

Photo has it on > You deselect it obviously



From Quora: How do I eliminate photos from my mac without eliminating them from icloud 



Also see Apple's support article on how to Get help with your iCloud Photo Library