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 ﷺ 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.' "
يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ أُمِرْتُ بِقَرْيَةٍ تَأْكُلُ الْقُرَى يَقُولُونَ يَثْرِبُ وَهِيَ الْمَدِينَةُ تَنْفِي النَّاسَ كَمَا يَنْفِي الْكِيرُ خَبَثَ الْحَدِيدِ