Shaykh Ibn Baaz (may Allah have mercy on him) was asked: My father is elderly and does not go to pray in congregation, and he says that he is ill with something that causes bad breath and an unpleasant smell, and he says that he does not want to annoy the people with this smell. Is it permissible for him to do this?
He replied: Yes, this is a legitimate excuse. If he has severe halitosis that smells bad and he cannot remove it, then he is excused. Similarly, onions or leeks are an excuse. But if there is any remedy or a way to remove the smell, then he must do that, so that he will not stay away from Jumu’ah prayer and prayers in congregation. But if he is unable to do that and it is not easy for him, then his excuse is stronger than the excuse of the one who eats onions. Undoubtedly bad breath is annoying to the people around him, if the smell is obvious.
End quote from Noor ‘ala al-Darb (tape no. 219, minute 11).