Deleting Photos from iPhone and iPad Please excuse my language as I am not technically minded. 

I have a new iPhone 4s with Version: 9.3.1(13E238)as well as a new Mac and iPad.  When I hit on photos icon the heading is "Moments" therefore I am not sure if this is a camera roll or what.
I wish to delete all photos on my iPhone and iPad to free up space but have them remain on my iMac.  I connected the phone to the Mac to upload my latest photos/videos.  However when I hit the bin icon I receive the msg: This photo will be deleted from iCloud Photo Library on all your devices. 

Other possible relevant info: I have iCloud Drive 'On' on my phone and iCloud Photo Library 'On' on phone.  On my iMac I am signed in to iCloud Drive on my iMac which is running OS X El Capitan V10.11.4.
You can achieve this in two ways:


Deactivating the "iCloud Photo Library", which links the photo libraries in every iOS / OS X device you own and have configured under the same Apple ID and automatically syncs every picture taken, added or removed to all the devices on the system. With the setting inactive, you can work in the "classic" way, by downloading the images of each device to your main library and then emptying your iOS devices. You won't get the alert because the libraries will no longer be synced.
Keeping the iCloud Photo Library on and activating the "Optimize [device] storage" setting under Settings > iCloud > iCloud Photo Library which will keep a full resolution copy of your image on iCloud and on the devices that don't have this setting on –your Mac, probably– and leave a lower resolution copy on your phone or any device with the setting activated. A higher resolution copy will be downloaded on demand if you open the picture later on.




Check the explanation Apple gives on the matter here: https://support.apple.com/en-us/HT204264

It's important to note that this will change the experience when browsing pictures on the Photo app a little bit, as each time you look at a picture in full screen it will begin downloading a bigger copy which will have a little delay; expect an increased use of your bandwidth and depending on your settings, of your data plan. Also, depending on the size of your Photo Library, you may fill the 5GB free plan and be asked to pay a monthly fee for an increase in your iCloud capacity.