Yes, a factory reset erases all data and settings, making it safe to sell or give away your device.