What is the ruling on breaking an oath sworn to perform a recommended act or abandon a disliked act?

General Chapter

Al-Mughni

Book of Oaths

Book 59 · Issue 2 · Bab 1

Open in Qurani

Primary text

If an oath is sworn upon performing a recommended act or abandoning a disliked act, then breaking it is recommended (mandub). The Prophet, peace be upon him, stated: "When you swear an oath, and you see something else better than it, then do what is better and make expiation for your oath." Another narration states: "I swear by Allah, if Allah wills, I will not swear an oath and then see something better than it, except that I will do what is better and break my oath."