Maliks Muwatta Book 45, Hadith Number 5.
Section : Residing in Madina and Leaving It.
Malik related to me that Yahya ibn Said said, “I heard Abu’l-Hubab Said ibn Yasar say that he heard Abu Hurayra say that he heard the Messenger of Allah, may Allah bless him and grant him peace, say, ‘I was ordered to a town which will eat up towns. They used to say, ‘Yathrib,’ but it is Madina. It removes the bad people like the blacksmith’s furnace removes impurities from the iron.'”