The Messenger of Allah ﷺ said, "The example of one who commits evil deeds and then performs good deeds is like a man wearing a tight coat of mail that is choking him. Then he performs a good deed, and one ring comes loose. Then he performs another good deed, and another ring comes loose, until it falls off onto the ground."
قال رسول الله ﷺ: إن مثل الذي يعمل السيئات ثم يعمل الحسنات كمثل رجل كانت عليه درع ضيقة قد خنقته ثم عمل حسنة فانفكت حلقة، ثم عمل حسنة أخرى فانفكت حلقة أخرى حتى يخرج إلى الأرض.
Ahmad (17307) narrated it from Ali bin Ishaq, who said, Abdullah, meaning Ibn Mubarak, told us, he said, Ibn Lahia told us, he said, Yazid bin Abu Habib narrated to me, he said, Abu Khayr narrated to us, that he heard Uqba bin Amir say... and then he related it. Its chain of transmission is hasan. Ibn Lahia, although he had weak memory, the imams accepted what Ibn Mubarak transmitted from him.Tabarani also narrated it in Al-Kabir (17/285) by way of Jareer bin Hazim, who said, I heard Yahya bin Ayub narrating from Yazid bin Abu Habib, from Marthad bin Abdullah (that is, Abu Khayr), from Uqba bin Amir, and then he related it. Yahya bin Ayub is Ghafiqi Misri, who was truthful (saduq), and it appears that he corroborates Ibn Lahia. However, Ibn Yunus said, "As for the hadiths of Jareer bin Hazim from Yahya bin Ayub, the people of Egypt do not have any hadith from them, and it seems to me that they resemble the hadith of Ibn Lahia." And Allah knows best.