Sayyida Aisha (may Allah be pleased with her) narrates: Whenever the Noble Prophet (peace and blessings be upon him) heard a bad name, he would change it. The Prophet (peace and blessings be upon him) once passed by a village whose name was ‘Afrah, so he changed its name to Khadrah.
Related hadith on this topic