The Halacha prohibits Borer (selecting) the P’solet (waste) from the desired Ochel (food). Rather, one must select the “good” from the “bad.” This is the basic of the conditions necessary to permit selecting from a mixture.
The Poskim discuss whether taking the entire mixture in one’s hand and shaking out the P’solet is permitted. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in Parashat B’shalach (Halacha 7), considers this Ochel from P’solet, since the desired item remains in his grasp. He brings the classic example of shaking pits off a slice of watermelon before eating it. Even though the P’solet is leaving the Ochel, it is still considered Ochel from P’solet, since he retains his hold on the Ochel (the watermelon) at all times.
The Ben Ish Hai even permits removing the pits while engaged in the act of eating. That is also not considered P’solet from Ochel, since, as the Menuhat Ahaba explains, this is “Derech Achila”-the usual way to eat. The Hachamim did not require one to put the pits in his mouth and then spit them out. That would be tantamount to requiring one to insert the nut with its shell into the mouth and only then spitting out the shell. Nevertheless, he does say that it is praiseworthy to be stringent.
Another application of this principle is pouring out the liquid that settles on top of a yogurt. Hacham Ovadia permits doing so immediately prior to consumption, because it is still considered removing the Ochel from the P’solet, since the yogurt remains in his hand. It seems that Hacham Bension (Vol. 1) also subscribes to this opinion. There appears to be a contradiction in the Mishna Berura between his ruling in his introduction to Siman 319 and his later ruling in 319:58.
It is permitted to shake pits off a slice of watermelon or to pour the liquid off the surface of a yogurt, before eating it.