How to completely disassociate iMessage from my device?

I have an older iPhone that I was thinking about selling soon in order to get a new one. I've set up iMessaging on the device. Normally I would just erase the phone a couple of times and be done with it. But recently, there has been exposed a glitch in iMessaging whereby users continue to receive other user's iMessages, even after the sim card is removed, and the phone is erased.

So I'm curious: is there any way to prevent this from happening?


There is a workaround for this issue. You change your iCloud account password and enter it on the new device. After that the old device will have your old password, reboot the old device and you have completely circumvented the issue.

Works perfectly for me.


Go into Settings -> Messages and halfway down choose Send and Receive.
Tap your AppleID on the top of the page, sign out, and let the new guy sign his or her self in.


Try this: On the device, go to Settings then iMessage then tap on 'Receive at'. Tap the Apple ID at the top and you get the option to 'Sign out'. No need to change passwords. Should stop messages on that device until you sign in again.