Nedarim 65 - How to cancel (annul) a vow
One may want to annul a vow which he took hastily and which causes him inconvenience. Or, one may realize that a vow is not a good thing to do. In either case, he should go to a Sage and petition for his vow to be annulled.
The Sage will ask about the circumstances. If it transpires that the man who made the vow did not realize some special circumstance that existed when he made the vow, and had he known about it, he would never have made the vow, the vow is considered a mistake from the beginning, and the Sage annuls it.
For example, a man came to Rabbi Akiva and said that he made a vow against his wife, so that she should not be able to benefit from him. Since he is obligated to give her benefits, in order not to transgress now he had to divorce her. Rabbi Akiva told him that: "Divorce and pay the full amount of the Ketubah." The Ketubah was 4,000 dinars. The man then said, "I inherited 8,000 dinars from my father, and half of it went to my brother. Of the remaining 4,000, couldn't my wife take half and I - also half?" But Rabbi Akiva told him that he would have to pay it all, even if he has to sell his hair. The man then said, "Had I known about this, I would never have vowed!" And this was exactly what is required for his vow to be annulled.
Art: Portrait Of The Artists Wife by Kazimir Severinovich Malevich