First to Fast Excerpted and adapted from a shiur by Rav Moshe Yitzchok Weg January…
Bee, My Guest
December 31, 2020
Q: A bee entered my home on Shabbos and my children were terrified. Would we have been permitted to trap or swat it?
A: One of the 39 prohibited melachos of Shabbos is tzod (trapping). But the trapping that is Biblically prohibited is specifically where one’s purpose is to benefit from the animal. Trapping an animal for any other purpose—like avoiding a sting—is forbidden Rabbinically. But Chazal waived their prohibition where the trapping is necessary in order to avoid severe pain. And even if an animal isn’t actively pursuing a person, as long as there is a reasonable concern that it may inflict severe pain, it might be trapped. Yet even in such a case, one may not trap the animal with a purpose-built trapping device, so that people shouldn’t think he is trying to trap it in order to use it (Sha’ar Tzion 316:39).
Contemporary poskim discuss whether the sting of a bee, wasp, or hornet is severe enough to occasion this leniency; most appear to hold it isn’t. (See Hilchos Shabbos B’Shabbato p. 216 n. 20, Archos Shabbos 14:22, Shloshim Yom Kodem Hachag Hil. Yom Tov n. 215, and Kovetz Zohar Vol. 12 p. 158.) Thus, according to most poskim it is forbidden to place a cup over a bee in one’s house or sukkah.
Regarding killing the bee, the halacha is more stringent: Even animals that cause severe pain may not be killed on Shabbos unless they are pursuing a person or one kills them in a way that looks as if he wasn’t trying to kill them. So killing the bee with a fly swatter would be prohibited.
All of the above assumes there is no one in the home known to be allergic to bee stings. If there is, one may kill the bee in the normal fashion, like with a spray or fly swatter, due to the danger involved.