How to Get Rid of Pantry Moths
To get rid of pantry moths, start by taking everything out of your pantry and throwing away any food that contains eggs, larvae, or adult moths. Then, vacuum out your pantry using a hose attachment. When you're done vacuuming, scrub the inside of your pantry with soap and hot water. You should also scrub any plastic containers that were inside the pantry. Once everything is clean, dry off your pantry with a dish towel and refill it.
Remove everything from the pantry. In order to clean the pantry thoroughly, it needs to be completely empty. Only getting rid of infested food won't be enough to exterminate these pests. This includes all opened and unopened food items, crockery, and any cooking equipment that you might store in there. Anything on top of a shelf needs to be removed before you can start cleaning. Throw away infested and contaminated food. Any food that shows clear signs of contamination should be discarded. This includes food that you can see the pantry moths in, as well as any other opened dry goods. Pantry moth eggs are hard to spot within dry goods, so it's better to discard and replace any open food. If you are hesitant about throwing away food that you cannot see any adult pantry moths in, you can place the dry food in the freezer for 1 week. The cold temperatures will kill any moth eggs that you cannot detect with the naked eye. After 1 week, run all of the food through a sieve, and then you can eat it again. If you see any holes in unopened food packaging that you didn't make, it was most likely the pantry moths. Remove and clean under all shelving liners. Remove any old liners and vacuum beneath them. Replace the old shelving liners with new ones if you want. If you aren't replacing the shelving liners, wipe clean the ones you currently have with a damp cloth and kitchen disinfectant. Vacuum the entire pantry. Use a vacuum cleaner with a hose and an angular nozzle attachment to clean the walls, baseboard, and corners of the pantry or cupboard. This will remove any remaining moths and cocoons. Focus on areas with webbing, larvae, or adult moths, but vacuum the entire area. This includes all hardware, wire shelves, and pin holes in the cupboard. Take out any trash containing moths, eggs, and contaminated food items. The vacuum bag and any trash bags containing infested food should be immediately removed from the kitchen and taken outside. Try not to leave the trash bags or vacuum cleaner bag in your house for any longer than necessary. If possible, place the bags on the curb or in an area that does not share a wall with your house. Scrub the pantry with soap and hot water. Use a dish towel or sponge to wash the walls, floors, doors, and shelves of the pantry or cupboard. Scrub every possible space in the pantry that you can access. Make sure that you get the door hinges and door jamb, as these spots are the most common hiding places for larvae. You should also scrub beneath any interior racks. Wipe down the pantry with vinegar, warm water, and peppermint oil. Combine 1 part vinegar with 1 part warm water, and add a few drops of peppermint oil. Wash the entire pantry with the solution. Pantry moths hate peppermint oil, so this will work to repel them in the future. Wash any containers and jars from the pantry in hot, soapy water. If you have plastic food containers or glass jars currently in your pantry, remove the contents, and wash them in a dishwasher or use hot water and dish soap to clean them out thoroughly. Make sure that you use a scrubbing brush to get them fully clean. This is an essential step if the containers were exposed directly to the pantry moths, but even if there were no pantry moths inside the container, it is still a good idea to temporarily remove the contents of the container and wash it. Doing so will also allow you to more closely examine the contents for evidence of infestation. Dry the pantry and all of the washed containers thoroughly. Before putting everything back into the pantry, dry the inside of the pantry with clean dish towels or paper towels. Make sure that there is no moisture left on any surface. Make sure that you dry the walls and doors of the pantry too. Place bay leaves in the corners of your pantry or cupboard. You can also tape them to the walls or the undersides of your shelves. You can also add a bay leaf directly to your container of rice, flour, or other dry food. The bay leaf won't affect the quality of the food, but if you would rather not chance it, you could tape the bay leaf to the inside of the lid and still achieve the desired effect. Note that there is no definitive scientific evidence to support this practice, but there is no definitive proof to discredit it, either. It may only be a "folk remedy," but it is one that many seem to agree on. Store all new dry foods in airtight containers. Use plastic, glass, or metal containers to store freshly purchased flour, rice, and other foods. This will help to prevent reinfestation of pantry moths. Storing food in airtight containers also means that if you happen to purchase any infested foods, that the pantry moths won't spread to other foods and will be trapped in the container. Freeze new dry goods for 1 week to prevent repeat infestations. In the event that you purchase goods with moth eggs already inside, freezing the food for 1 week should effectively kill the eggs. At this stage, they will be harmless and virtually impossible to spot with the naked eye. Look for adult moths or larvae. Adult moths are generally gray with hints of either red or white coloring, and they measure roughly 1/2 inch (1.27 cm) long. Larvae are about 1/2 inch (1.27 cm) long and look like worms with 5 pairs of legs. The easiest way to spot a pantry moth problem is to actually see an adult moth flying around your pantry. This usually happens at night rather than during the day. If you suspect that you may have a pantry moth infestation, check all the dry food in your pantry. Moths hide out in flour, cereal, rice, and other grains most often, but you should also check pet food, dried fruit, or any other dry food products. In short, check everything. Check your pantry for cocoon webbing. Look in the corners and along the inside edges of the cupboards for clumps of stringy or grainy material. Pantry moths leave webbing almost everywhere that they crawl, and it is within the cocoon that they can lay hundreds of eggs. Cocoon webbing is usually found behind where a shelf meets a wall or beneath shelf paper. Inspect your dry food packaging for holes. Small holes appearing in dry food packaging that you haven't created are an easy way to tell if your home has pantry moths. Check all boxes, bags, and plastic wrapping for signs of these pests. The holes won't always appear only once the food is in your home. Food is sometimes sold already contaminated with pantry moths, so check all packaging before you purchase your groceries. 
Remove everything from the pantry. Throw away infested and contaminated food. Remove and clean under all shelving liners. Vacuum the entire pantry. Take out any trash containing moths, eggs, and contaminated food items. Scrub the pantry with soap and hot water. Wipe down the pantry with vinegar, warm water, and peppermint oil. Wash any containers and jars from the pantry in hot, soapy water. Dry the pantry and all of the washed containers thoroughly. Place bay leaves in the corners of your pantry or cupboard. Store all new dry foods in airtight containers. Freeze new dry goods for 1 week to prevent repeat infestations. Look for adult moths or larvae. Check your pantry for cocoon webbing. Inspect your dry food packaging for holes. 