Weevils come in many shapes, sizes, and colors. Granary and rice weevils range in size from ⅛‒¼ inches. The granary weevil is a shiny dark brown, lives in northern climes, and is unable to fly. The rice weevil is a dull reddish brown, likes warmer climates, and can fly.
Granary Weevil
Rice Weevils
Weevil Pupae

If you use raw ingredients like wheat flour, wheat berries, barley, or rice, you have probably had to deal with weevils. It also means you have probably eaten thousands of weevils and other insects without knowing it. That fact remains largely unknown to the blithely ignorant processed-food-eating public—maybe it's better that way? There are tens of thousands of species of weevil, but the ones you will probably deal with are the granary weevil (Sitophilus granarius), and the rice weevil (Sitophilus oryzae). Once you've discovered your problem, you face the choice of throwing infested food away, or freezing the beetles, and being grateful for the extra protein.
If you have weevily food, throw it out. Unless you enjoy eating insects, get rid of that stuff. Remember, they've been eating, defecating, and mating in there. Another thing to consider is that keeping contaminated food around will allow them to breed and spread into other food items (like bread and breakfast cereal). You probably won't die if you eat the weevily grains (if they've been cooked), but some house guests just won't appreciate beetles crawling around in their bowl of oat loops. You're better off getting them out of your house as soon as you make the discovery.
Clean the area thoroughly. Once you've gone through all of your staples and thrown out the contaminated food, move all of the containers out of the area, leaving the space empty. Vacuum all dust, food remnants, and beetles from your cupboards and shelves. Next, give them a good scrubbing with soapy water, being sure to wipe the walls, floors and ceilings around your cupboards or pantry. Sanitizing with a premixed sanitizer or diluted bleach spray is also a good idea. Don't forget to clean contaminated containers inside and out; there could be eggs or beetle remnants left behind. Cleaning the outside of uncontaminated food containers is also a good idea.
Freeze food staples like flour and grain. After you have taken steps to eliminate all of your obviously contaminated foods, check back after a month to make sure no new beetles have hatched. Think about ways to prevent new weevils from making their way into your pantry. First of all, inspect the products you are buying for signs of contamination. Next, when you bring home items like rice, wheat, flour, cornmeal, oats, cereals, etc., pop them in your freezer for a couple of days before storing them in your dry pantry. This will kill all living weevils and their eggs.
Another option involves heating grains. Because weevils will often lay their eggs inside the grains, it is difficult to see eggs or larvae until it is too late. If you don't have the space to freeze all of your grains/grain products, some of them can be treated with heat instead. This works for grains that are going to be cooked later anyway. I wouldn't heat breakfast cereal or flour in the oven; it might burn and get ruined. But whole grains like rice and barley should be fine. Heat your oven to 120 degrees F and allow the seeds to heat for an hour. Microwaving for 20-30 seconds on high will also do the trick. This should kill any weevils or larvae hiding out in your grain.
Store food in airtight containers. Once you've cleaned everything and killed any potential future infestation by way of newly purchased food, invest in some good, airtight, pest-proof containers. These will keep out weevils, moths, mice, roaches, and all sorts of dirty monsters trying to eat and poop in your food. They don't have to be expensive. They need to be sealable and not something an animal can chew or wriggle into. Tin containers or glass jars are a good choice. Look at thrift stores for some stylish examples from the 1960s. They had weevils back then, too.
Buy smaller amounts of food. Most grains and staples you buy probably have some weevil eggs in them. If you use the grain within a week or two, you will probably never notice, as the larvae won't mature. The only time I have had problems with flour beetles and granary weevils is when I have bought large quantities of a grain and not used it up right away. Unless you have the ability to freeze large amounts of grain and store it inside a pest-proof bin, it is better to buy in smaller amounts. The potential for waste is just too great; I think it outweighs the savings from buying in bulk.
Once you have cleaned out your food storage areas and gotten rid of all potentially infected food, consider using a house-safe weevil insecticide around the area, just to make sure. Do this only if all your food has been removed, and you feel comfortable with the possibility of poisoning yourself. I would look into a pyrethrin-based product like CB-80 Extra, or Riptide Waterbased Pyrethrin ULV. Remember, only treat the area; don't spray food directly.

Bay leaves. Not just an old wives' tale, the weevil deterrent qualities of bay leaves have been known for centuries. Add a few to all of your grain and flour containers. Don't worry, they won't impart too much bay leaf flavor to your grains, just enough to ward off pantry pests.

Cloves and rosemary. Same idea as the bay leaves. The smell from these common cupboard inhabitants is supposed to deter weevils from making their home in your grains and flours. Try making a cheesecloth sachet which contains bay leaves, cloves, and rosemary; hang it in your pantry.

Organic insecticides. There is a product available online called Eco Exempt IC-2 that is made from oil of rosemary and oil of wintergreen. It is designed to kill and repel weevils without using dangerous poisons. You still wouldn't want to apply this to food, or use on surfaces which will contain food. But it is nice for spraying around storage areas.