Mealworms can be persistent pests in many home pantry shelves. They are most easily recognized during the larval or caterpillar stage before they turn into beetles. At this stage they appear like small worms that are brownish-yellow in color. They come into your pantry in cardboard boxes from the store, from dog or bird food that you have stored, or even through an opened door in your house. You may find them in cereal, flour, baking products and other dry foods and grains. You can kill mealworms, but it takes perseverance and continued monitoring.
Put dry goods that are infested with mealworms in the freezer for a few days. The freezer should be set between 0 and 17 degrees Fahrenheit. This should kill the mealworms.
Place mealworm pheromone traps in your pantry to attract the adult mealworms. Follow the instructions on the trap. These are pieces of cardboard covered with a sticky substance and baited with a pheromone that flour moths can't resist. They are available at most stores that stock birdseed.
Spray a food-safe insecticide throughout your pantry for crawling insects. Make sure the label says that it is safe for use in kitchen areas. Always follow the directions on the label. Additional mealworms may hatch later so keep treating until all the mealworm eggs have hatched and the adults have been killed.