The Messenger of Allah ﷺ said, "I have been commanded to settle in a town that consumes other towns and expels the impure, just as the bellows expel the impurities of iron."
حدثنا عفان حدثنا حماد أخبرنا يحيى بن سعيد عن سعيد بن يسار
أن رسول الله ﷺ قال أمرت بقرية تأكل القرى وتنفي الخبث كما ينفي الكير خبث الحديد
Its isnad is sahih. The hadith was mentioned previously at 7231 and 7364, and it is found in Bukhari in the Book of Umrah, chapter on the merit of Madinah, and in Muslim in the Book of Hajj, chapter on Madinah expelling its wicked inhabitants.