How can I delete a device off of iCloud without losing everything?

Need to delete a device off iCloud but don't want to lose everything

Basically I took my iPhone travelling with me so have 1000s photos on there. I stored them all on iCloud and I am now getting a new phone. I don't want all of these photos on my new phone because I don't have the space - I am going to buy an apple computer so could store all of the photos on there... If i were to sign my computer into my icloud (so all of the photos were on there) but then removed my current iPhone from the cloud, would I lose all the photos as I took them on my phone?
Re: Need to delete a device off iCloud but don't want to lose everything

Hi, welcome to iMore.
First make sure all your photos are synced to your computer after logging in. Then go to iCloud com and delete your device as you wish. Deleting your device isn't equal to deleting all information saved on iCloud.

Your phone will simply not be associated with your account anymore.

After buying your new iPhone, you can go to Settings > iCloud and toggle off iCloud Photo Library and My Photo Stream. This way your photos on iCloud will NOT be synced to your new phone, but will stay on iCloud till you decide to do otherwise.

Original thread: https://forums.imore.com/threads/how-can-i-delete-a-device-off-of-icloud-without-losing-everything.366738/