When a question arises whether the Prophet peace be upon him, disliked any type of food, it is often mentioned in answer that the Prophet peace be upon him, disliked onion and garlic. This, however, is a personal dislike, which does not encourage people to abandon eating them. Ayesha was asked about eating onions and she answered: “The last meal the Prophet, peace be upon him, ate contained onions.” (Related by Ahmad, Al-Nassa’ie and Abu Dawood.)
This was most probably a cooked meal, because the Prophet peace be upon him, simply disliked the smell that onions and garlic gave. Abu Ayyub Al-Ansari reports: “When the Prophet peace be upon him, was given some food, he would eat of it and send me what is left. Once he sent me a dish and I realized that he did not eat of it because it contained garlic. I asked him whether it was forbidden to eat garlic. He said: ‘No, but I dislike to eat it because of its smell.’ Abu Ayyub said to him: ‘I dislike what you dislike.'” (Related by Ahmad, Muslim and Al-Tirmithi.)
We note in both Hadiths that the Prophet, peace be upon him, was keen to make clear to his companions and all Muslims that there is nothing wrong with eating onion and garlic, as both are permissible. He simply disliked having the mouth smell that eating these two gave. On one occasion he mentioned that he did not wish to offend the angels who came to him at different times of day by having such mouth smell.
Scarcity of food in desert areas makes its inhabitants eat what other people would not eat. The Arabs at the Prophet’s time used to eat lizards, which could be found in desert areas. We may think that this is totally unappealing, but apparently some people found it acceptable. Once a lady companion of the Prophet, peace be upon him, called Umm Hufayd, who was the maternal aunt of Ibn Abbas, sent him a gift consisting of butter and dried milk, as well as lizards. The Prophet, peace be upon him, ate of first two, but he did not touch the lizards.” (Related by Ahmad, Al-Bukhari, Muslim and Abu Dawood.) In this case again the Prophet, peace be upon him, did not disallow eating such food. He simply felt that it was repulsive.