Question: May one remove the pit of a date or an apricot on Shabbat before eating it?
Answer: In the previous Halachot, we have spoken about some issues regarding the forbidden work of selecting on Shabbat. We have also mentioned that selecting is only permissible when three conditions are met: One must select by hand and not with the use of a utensil (such as a strainer), one must select the food from the waste and not opposite, and one must select in order to eat the food immediately (as opposed to leaving it for a later time). Now, regarding our question:
It would seem that since the pits are waste and the fruits are food, it will be forbidden to select the pit from the fruit on Shabbat; rather, one should eat the fruit with the pit and only afterwards should one spit out the pit.
However, as we have already mentioned above, Rabbeinu Yaakov Abulafia writes that there is no prohibition to select during the time one is actually eating. Since the pits are being removed at the time one is eating, the prohibition of selecting does not apply. Many Poskim rule likewise, including the Mishnah Berura (Chapter 321). Nevertheless, we have written that we do not rule in accordance with the view of Rabbeinu Yaakov Abulafia (and we only include his opinion as an additional leniency among other reasons). It would thus seem that there is no room for leniency in this matter.
However, it seems from the Peri Megadim and other great Poskim that there is another reason for leniency in this situation which is because “it is impossible without this,” i.e. the prohibition of selecting does not apply to something which is difficult to eat without first selecting it. Thus, since it is strange to eat a date with its pit still inside it, one may therefore first remove the pit and then eat it. (This is especially true since we can include an additional reasoning for leniency which we have already discussed which is that the prohibition of selecting does not apply to something attached.)
One may act leniently especially with regards to dried dates which halachically require them to be checked for worms before eating them, in which case one may certainly remove their pit first and then check them well. The same law applies to cherries in situations where they must be checked; one should open them up, remove their pit, and only then eat them. The same applies to plums as well.
Nevertheless, it is preferable to be stringent and not remove the pits of a large amount of dates, even if one intends to eat them all immediately; rather, one should remove them while eating, one by one. (The reason for this is because Rabbeinu Peretz maintains that even garlic and onions may only be peeled in small amounts but not large amounts at once, for this appears like one is selecting on Shabbat. The same applies to any manner in which one selects on Shabbat, even permissible manners, such as removing the pits from a large amount of dates in order for them to be eaten together, in that one should preferably act stringently and do so only one by one and not to select a large amount with the intention of eating it within a few minutes, although, halachically speaking, one may act leniently in this regard, as the Sefer Yalkut Yosef rules.)
Summary: One may remove the pits from dates or apricots on Shabbat in order to eat them immediately. One may act leniently in this regard especially when the fruit requires inspection for insects and worms. It is preferable to do so only one by one, however, and not to remove the pits of a large amount of fruit all at once.