There are many tiny bugs which can infest a pantry.
10+ Tiny Red Bugs In Pantry. From their name, you might imagine that these tiny beetles like to live in containers of flour, cereal, or rice, and you'd be right. The are in liquid forms and the pantry pests get caught either on an addtional glue board (with the pheromone placed on the glue, or inside a pitfall trap.
Bugs In Your Pantry And How To Get Rid Of Them from img.webmd.com
To confirm pantry pest activity, look in or around your pantry or where foodstuff is stored. The tiny gray bugs in your bathtub may be gnats. If you smash them they leave a red smudge.
You might have the merchant grain.
It's hard to be sure from your description. Merchant grain beetles, which fly, and sawtoothed grain beetles, which. Spider beetles forage at night and are often found in pantries or attics. It's hard to be sure from your description.