Jabir bin Abdullah reported,

A bedouin Arab pledged allegiance to the Messenger of Allah ﷺ, then the Arabi was struck by a fever in Medina. He came to the Prophet ﷺ and said, "Muhammad, release me from my pledge."The Messenger of Allah refused.Then he came again and said, "Release me from my pledge."He refused.Then he came once more and said, "Release me from my pledge."He refused.So the Arabi left, and the Messenger of Allah ﷺ said, "Medina is like a blacksmith's bellows. It expels its impurities and its goodness shines forth."

Azami 7660

Sahih

عن جابر بن عبد الله

أن أعرابيا بايع رسول الله ﷺ، فأصاب الأعرابي وعك بالمدينة، فأتى النبي ﷺ فقال: يا محمد! أقلني بيعتي، فأبى رسول الله ثم جاءه فقال: أقلني بيعتي، فأبى، ثم جاءه فقال: أقلني بيعتي فأبى، فخرج الأعرابي فقال رسول الله ﷺ: إنما المدينة كالكير تنفي خبثها، وينصع طيبها.

الأعظمي 7660صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Breaking the pledge of allegiance, discouragement from
Numbering
Jami al-Kamil 7660 (2nd edition)