You can get rid of pantry bugs in a short amount of time by either heating or freezing the infested grains for a while. Doing so will kill the weevils present in the food source. If you are heating the food grain, make sure that you do so for around 15 minutes at around 140 degrees F temperature.