1) The Torah forbids the consumption of creatures that crawl either on the ground or in the water, including insects, worms and larva etc. It also forbids the consumption of flying insects, except for specific species of locusts which are beyond our ability to identify, since today we have lost reliable tradition in this matter. This being the case, in practice, all bugs and insects are banned from consumption. Great care should, therefore, be taken in avoiding this.
Inspecting for Bugs
2) All vegetables that are prone to bug infestation should be checked before consumption and washed thoroughly to rid them of bugs if they are found to be infested. This includes most leafy vegetables, such as lettuce, parsley, cilantro, basil etc., as well as broccoli, artichoke, asparagus etc. Other fruits and vegetables, which are not regularly prone to infestation, such as carrots, parsnips, turnips, potatoes, apples, oranges etc., need only a cursory check before use. However, if there is reason to believe that they may be infested with bugs or larva, they too need to be checked thoroughly. This is usually indicated by a hole on the outer surface of the fruit where a creature may have burrowed into the fruit. In this case the fruit should be cut open and examined internally.
3) Many dry goods, such as barley, beans, lentils, peas, rice, flour etc. are also subject to bug infestation. One should be alert and diligent when making use of them.
4) With all the above in mind, it is certainly a praiseworthy practice to always be on the alert for bugs whenever handling or eating food. This habit will safeguard a person from consuming bugs or larva inadvertently.
5) Even though one is required to do so when necessary, the Halacha does not prescribe any specific procedures for the washing and checking of fruits, vegetables or dry goods. Rather, it only specifies that they be free of bugs and larva and that they be thoroughly washed and checked if the need arises. Since there are many such methods and many opinions as to which are the most effective, consult your rabbi about which procedures you should follow.