When selling your phone, what steps should be taken to make sure that all personal data has been removed?
Remove the SD Card and SIM Card, and then do a Factory Reset.

If your device doesn't use full disk encryption, and you are worried about someone using advanced forensic tools to recover your data, you might want to overwrite the internal storage area with random data. You can do this by creating a file containing random data that fills up the entire free space. Once you've done that, do another factory reset.

If you've flashed and/or rooted your device, you would want to flash a stock ROM, and restore the default boot loader.