“O people, you eat two plants that I find are nothing but obnoxious; this garlic and this onion. At the time of the Messenger of Allah (ﷺ), if a foul odour was detected from a man, I would see him seized by the arm and taken out to Al-Baqi’. Whoever must eat them, let him cook them to death.”
Sunan Ibn Majah Book 5, Hadith 212