To get rid of bugs in your pantry naturally, the first step is to locate the source of infestation and throw away the contaminated food. Then, thoroughly clean the pantry with soap and water, and wipe down all surfaces with vinegar or essential oils like peppermint or tea tree oil, which are natural insect repellents. Place bay leaves or cinnamon sticks in the pantry, as many bugs dislike these strong scents. Additionally, store all dry food items, like grains and pasta, in airtight containers to prevent future infestations.