I do not eat any factory produced foods - mainly only what I cook...maybe three to four meals a year at a restaurant. Never from a take-away. If I want a sauce, I make it myself.
More important that not eating garlic and onions, is that you stop eating factory and or restaurant made foods. I'm not saying you must go to extremes, our bodies can easily handle the rare ham, bacon, jam and so on.
Watch out for spices and herbs (and honey of course) which have been radurised. They not only have no nutrition, they can harm you.