If you need to remove a device from your iCloud account, you can do it on any device. You can remove device from iCloud in your Mac's System Preferences or your Apple mobile device's Settings.
Your Apple devices use iCloud to keep backup and sync. If you're no longer using a device, though, you should remove it from your iCloud account.
If you purchased an Apple device that is still connected to someone else's iCloud account, contact the old owner and ask them to remove it using iCloud.com.
How to remove device from iCloud
Most Apple users use iCloud to sync and back up their devices, as well as to access some Apple services available through iCloud. However, when you stop using, giving away or selling one of your devices, you need to remove it from your iCloud account. You can do this using your iPhone, iPad or Mac.
1. How to remove a device from iCloud using an iPhone or iPad
1. Launch the Settings app and then tap your account name at the top of the screen.
2. Scroll down to find the list of devices linked to your account. Tap the one you want to remove.
3. Tap “Remove from Account”. You will need to confirm that you want to do this.
2. How to unpair a device from iCloud using a Mac
1. Click the Apple icon at the top of the screen, then choose "System Preferences ..."
2. Click "Apple ID" at the top right of the System Preferences window.
3. In the left pane, scroll down and click the device you want to remove. Then click "Remove from account ...". You will need to confirm that you want to remove it.
3. How to unpair a device from iCloud that you no longer have
If you recently bought an Apple device but can't start using it because it's still linked to the original owner's iCloud account, you'll need that person's help to reset the device and sign in. Contact the old owner and ask him to perform these steps:
1. Open iCloud.com in a web browser and log in if necessary.
2. Click "Find iPhone". (Go here even if it's a different type of device, like an iPad or Apple TV.) The owner may need to sign in with their Apple ID.
3. Click "All Devices" at the top of the screen, then click the device you want to remove.
4. Click “Erase [device name]”.
5. Click "Delete". The device will be reset to factory settings and removed from the iCloud account.