How to remove dirt [i.e. dust, hair lash, insect] from your food on Shabbos:
Background: It is Biblically forbidden to separate waste from the food on Shabbos. This prohibition is called Borer. This prohibition applies even if the waste is the minority of the food. Any item which one does not desire to eat right away and is of a different substance than the remaining food is defined as waste in this regard. Accordingly, the question is asked as to how one is to separate dirt from ones food on Shabbos without transgressing the Borer prohibition.
The law: It is Biblically forbidden to remove the dirt from the food, as explained above. However, some Poskim rule that this only applies if one removes the dirt by itself, without removing any of the food together with it. However, if one removes the waste together with some of the food, such as [using a spoon to] remove a fly from a cup together with some of the liquid, then it is permitted to be done. However, other Poskim negate this allowance and rule that it is Biblically forbidden to remove the waste even together with some of the food, and the Biblical Borer prohibition applies even in such a case. Practically, although many are accustomed to being lenient, one is to be stringent like the latter opinion, and so is the ruling followed by Chabad Chassidim. Accordingly, the only remaining option for removing the dirt from one’s food on Shabbos is to eat around the area of waste, and leave the waste positioned in its place. Once one has concluded eating around the waste, and it is no longer considered mixed with other foods, he may wipe it entirely off the plate. If the dirt is floating in a liquid, such as a drink or soup then another available option is to blow the waste to the side of the cup and then pour out the dirt together with some of the liquid.
If dirt fell into one’s food, the only option for removing the dirt from one’s food on Shabbos is to eat around the area of dirt, and leave the dirt positioned in its place. Once one has concluded eating around the dirt, and it is no longer considered mixed with other foods, he may wipe it entirely off the plate. If the dirt is floating in a liquid, such as a drink or soup then another available option is to blow the waste to the side of the cup and then pour out the dirt together with some of the liquid.
 Admur 319:1; Michaber 319:4
The reason: The reason for why removing the waste is forbidden is because the removing of the waste [from the food] is not [considered done in] the normal framework of eating [which is permitted to be done as will be explained below] but is rather [considered] preparing the food so it be fit to eat which is a complete [Biblically prohibited] act. [Admur ibid]
 Admur ibid; Rama 319:4; Beis Yosef 319 based on Rambam
Other opinions: This is opposed to the ruling of the Tur 319 which holds that in such a case one is allowed to remove the waste rather than the food as doing so is the way of eating. Admur and others however limit this ruling only to Yom Tov and not on Shabbos. [See Shabbos Kihalacha Vol. 2 p. 141]
Opinion of Michaber: The Michaber agrees with the ruling of the Rama ibid, as is implied from the fact that he did not mention any allowance in his rulings regarding majority food. [Biur Halacha 319:1 “Haborer”]
 Admur 319:5; Michaber 319:3
 Admur 319:24 “If a fly fell into a cup one may not remove only the fly from the cup being that doing so is equivalent to separating waste from food which is forbidden to be done even in order to eat right away.”; Taz 319:13; All Poskim in next footnote
 Admur 319:24 [unlike his ruling in the Siddur]; Taz 319:13 and 506:3; Beir Heiytiv 319:19; Ben Ish Chaiy Beshalach 12; Chayeh Adam 16:2; M”B 319:61; Kaf Hachaim 319:42; Even Yisrael 9:25
 The reason: Being that then it does not appear like one is separating at all. [Admur ibid] Seemingly, the reason is because when one removes the bad together with the good, it is not recognizable that one has selected bad from good, and it is thus permitted.
 Admur in Siddur [unlike his ruling in 319:24] “One may not rely on the customary permission granted that if there is waste in ones food then one removes it together with some of the food etc, as doing so is questionable of containing a sin offering liability and a prohibition of Sekilah G-d forbid.”; Peri Megadim 319 M”Z 13 implies that this Heter to remove the bad with the good only applies in certain scenarios, as explained below; Kaf Hachaim ibid concludes it is best to be stringent like Admur in Siddur; Chazon Ish 53 questions ruling of Taz ibid; See Piskeiy Teshuvos 319:44
Opinion of Peri Megadim: Peri Megadim 319 M”Z 13 implies that only if one separates only some of the bad together with good, and will thus still leave some of the bad with the mixture, is one not liable for Borer, however if one separates the entire bad, then he is liable for Borer even if he removes some of the good. Furthermore, he implies that even if one leaves some of the bad with the good, and removes the bad with some of the good, it is only permitted in a case that if one were to remove the entire bad from the good he would not be Biblically liable, otherwise, it remains Rabbinically forbidden.”
 As testified by Admur in Siddur ibid
 As concludes Kaf Hachaim ibid
 Shaar Hakolel 1:1; Likkutei Sichos 11 p. 246; Introduction of the Rebbe to the Shulchan Aruch Harav; See Divrei Nechmia 21; Kaf Hachaim and Piskeiy Teshuvos ibid conclude it is best to be stringent
The reason: Whenever there is a difference in ruling between the Siddur and the Shulchan Aruch one is to follow the rulings of the Siddur. The reason for this is because the Siddur was written later than the Shulchan Aruch and hence represents the final ruling of Admur in the given subject. [ibid]
 Admur in Siddur ibid “One may not rely on the customary permission granted that if a fly or other waste falls into ones cup or plate then one removes it together with a spoon and takes out with it some liquid etc, as doing so is questionable of containing a sin offering liability and a prohibition of Sekilah G-d forbid. Thus, the only solution that remains is to pour out from the cup until the waste comes out from it. One may not blow on [the waste] with his mouth until it is blown out, although he may blow it to bring it nearer to the wall of the cup and then tilt it and pour from it until the waste comes out.”
The reason that tilting it out is allowed: As since the removal of the waste is being done through him holding the cup of liquid in his hand and tilting it with his hand this is considered separating food from waste which is permitted to be done in order to drink it immediately. [Admur in Siddur ibid]