What is the law if one found insects in food, may he still eat it after their removal?
The general rule:
If one found three insects within a food product, such as within a bag of rice, then it is assumed that the food is infested and it is hence forbidden to be eaten unless one inspects the remaining product for insects. If after inspection the food is found to be clean of insects, or has had all its insects removed, then it is permitted to eat the food. There is no requirement to discard the food after finding three insects, and one may even initially choose to inspect it, clear it from its insects and then eat it. [Thus, if after finding three insects in a bag of raw rice one still desires to eat the rice, he must inspect the rice prior to use.] If, however, it is not possible to properly inspect the food for remaining insects, then the food is forbidden. The following is the practical application regarding if the insects were found in a cooked food, such as a stew, in which inspection for insects may seem impractical.
Insects found in cooked foods:
Insects found in a cooked pot of food: If one found three insects within a pot of cooked food, then the entire pot of food is forbidden to be eaten with exception to those parts of the food that can be properly filtered and checked for insects. Thus, one can salvage the liquid gravy of the food [i.e. soup broth] through filtering the liquid [through a dense cloth and thus removing from it all solid materials and potential insects]. Likewise, [any solid piece of food that was in the stew, such as] a chunk of meat [or whole fruit, mushrooms], can be removed and washed and then inspected for insects. However, the cooked vegetables, [and the parts of the food in the pot that cannot be filtered or inspected, such as thick gravy, or a glob of cooked grains/legumes] are forbidden to be eaten and must be discarded. [This refers to disintegrated pieces of vegetables, or solid leafy vegetables such as parsley, which cannot properly be inspected once they are cooked and hence must be discarded. Likewise, if three insects were found inside the solid vegetables, or were found in the gravy but are suspected to have come from the vegetables, then all the solid vegetables are forbidden to be eaten, as explained next. However, if the insects were found floating in the gravy, and are known to have come from a different food, and not from the vegetables, then the solid vegetables may be washed, inspected and then eaten, just like the meat. Nonetheless, it is proper not to eat the vegetables even in such a case.]
Insects found in a a cooked vegetable: If three insects were found inside cooked solid vegetables [i.e. one opened the vegetable and found an insect], then all the vegetables in the pot are forbidden to be eaten, as it is not possible to check them properly. [However, other foods, such as fruits and mushrooms may be checked even after they are cooked.]
If one found three insects within a food product then it is forbidden for the product to be eaten unless one properly inspects the product for insects. Once properly inspected, it is permitted to be eaten.
Cooked food: If the three insects were found in a cooked food, the entire pot of food is forbidden to be eaten with exception to those parts of the food that can be properly filtered and checked for insects. Thus, if found in cooked vegetables, the vegetables must be discarded. If found in a stew, the gravy is to be filtered and have the meat and other solid foods washed and checked for insects. However, the vegetables are to be discarded and cannot be checked, unless one can assume the insects came from an outside source.
 See Michaber Y.D. 84:9-10; 100:4; Rama 84:9; Beis Yosef 84; Rashba 1:113; Raavad in Ran Chulin 3; Kol Bo Chametz Umatzah in name of Raavad; Orchos Chaim 2:309; Darkei Teshuvah 84:147-149; Encyclopedia Talmudit Erech Chazakah Vol. 13 p. 758
 Michaber Y.D. 100:4 “Cooked vegetables in which one found three worms, the vegetables are forbidden, although the broth is permitted after filtering, and also the meat may be washed, checked and then eaten.” Rama 84:9 “This only refers to a food that cannot be filters, and have its insects removed, as since it has received a Chazakah of being infested, it is completely forbidden. However, if one can filter it, then he is to do so and remove all the insects and then eat it.”; Rishonim ibid
Raw foods versus cooked foods: The Poskim ibid discuss this case only in regard to cooked foods, however, this is only in order to emphasize that by cooked foods it is at times not possible to inspect it for remaining insects and the entire food thus becomes forbidden. However, in truth this law would likewise apply to raw foods for both stringency and leniency that a) Once three insects are found it is an absolute obligation to inspect it prior to eating, and b) Once properly inspected, the food may be eaten. Now, although it is assumed that raw foods can always be inspected and then eaten, in truth there exists raw foods that are infested in such a way that it is not possible to properly inspect them, and hence these foods would be forbidden to be eaten, just as is the law by cooked vegetables. [See Rashba 113 regaridng raw vegetables; Peri Chadash 84:34; P”M 84 A”A 34; Kaf Hachaim 84:89]
 Michaber ibid and ibid; Beis Yosef 84; Taz 100:6; Peri Chadash 100:4; Bechor Shur in Hashmatos; Pleisi 100; Rebbe Shimon Ben Gamliel Yevamos 64b; See Birkeiy Yosef 100; Encyclopedia Talmudit Erech Chazakah Vol. 13 p. 739 and 758
Other opinions-Two insects: Some Poskim rule that even after finding two insects within the food one is to be stringent to assume that it contains more insects and hence one is to avoid eating it, unless it is filtered and inspected. [Bach Y.D. 100; Bechor Shur Chulin; This follows the opinion of Rebbe in Yevamos 64b who rules a Chazaka applies even after something occurs only twice.] Practically, the Taz 100:6 negates this opinion and concludes that less than three times is not considered a Chazaka. His reason is because we are only stringent to consider twice as a Chazaka by a case of Sakans Nefashos and not in other cases.
 The reason: As once three insects have been found we assume that there are more insects in the food. [Shach 100:11]
 Michaber ibid and ibid; Rama ibid; Rashba ibid
 See Peri Toar 84:22; Kaf Hachaim 84:88
 Shach 84:34 ion name of Levush 84:4; Peri Chadash 84:34; P”M 100 S.D. 11; Kaf Hachaim 84:86
 Kashrus Kehalacha [Edri] p. 202; See Michaber ibid and ibid that the cooked vegetables are forbidden. However, it seems Pashut that this only refers to vegetables that are disintegrated, or to leafy vegetables such as parsley, or to if the insects were found in the actual vegetables themselves [after opening them, as is the implied ruling of the Michaber ibid and ibid and Rashba ibid, who all write “Found in them”] due to the difficulty of checking them for bugs. However, a solid carrot or potato is no less checkable on its outside then is a fruit or mushroom. Accordingly, those Melaktim who wrote that whenever three insects are found in a food the vegetables are all forbidden, did not accurately portray the case, as the Michaber ibid refers to a case where the insects were found inside the vegetables, and simply inside the food. However, in truth, after a careful review of the Rashba ibid, it seems that even if the insects were found floating ion the gravy, if the source of the insects is from the vegetables, then it is as if they were found inside the vegetables, and hence all the vegetables are forbidden to be eaten due to their difficulty in checking. If, however, it can be determined that the source of the insects is not from the vegetables, then they may be washed and checked and eaten just like any other solid food.
 Michaber ibid and ibid; Rashba ibid
 The reason: As once three insects have been found inside the vegetables, we assume that there are more insects in the vegetables, and once vegetables are cooked it is not possible to check their insides for insects. [Shach 100:11]
 Shach 84:34 ion name of Levush 84:4; P”M 100 S.D. 11; Seemingly this refers even if three insects were found in the actual fruit or mushrooms. Vetzaruch Iyun!