Getting rid of icloud on old iphone
Go to Settings on iCloud.com, then look at the My Devices section.
In the list of devices, click the one you want to remove.
Click the Delete button (x) next to the device. If you don’t see the Delete button, click Remove Device (below the device serial number or IMEI number).


For full instructions please see here:
https://help.apple.com/icloud/#mm25565a6496