Desirability of Expiating the Oath taken by a Person who afterwards Breaks it for a better Alternative Riyad as-Salihin 1715
Arabic hadith text
عن عبد الرحمن بن سَمُرَة رضي الله عنه قال: قال رسول الله صلى الله عليه وسلم : "وإذا حلفت على يمين، فرأيت غيرها خيرًا منها، فائت الذي هو خير، وكفر عن يمينك" ((متفق عليه)).
Translation
'Abdur-Rahman bin Samurah (May Allah be pleased with him) said
The Messenger of Allah (ﷺ) said to me, "When you take an oath and consider something else to be better than it, make expiation for your oath and choose the better alternative."[Al-Bukhari and Muslim].