If these are tiny little black bugs these bugs get into your cupboards with something you have brought home from the store. I've had them too and it's a blasted nuisance and a lot of trouble having to clean out your cupboards all the time. I've found them in crackers, cereals and believe it or not Chili pepper! I now put everything in plastic air-tight containers. The other poster is correct that Bay Leaves do repel many bugs we can get in the cupboards. Marcy You can use bay leaves to repel bugs from food cupboards. Ants don't like any kind of pepper, lavender, garlic or onion. It is said that garlic or onion works on their nerve system, distortion their sense of direction. Most insects are reported to be repelled by garlic. I have successfully used a solution of essential oils of peppermint and Texas cedar in salt water, sprayed in a mister bottle along floorboards and cabinets. Use 60 drops of each in about 2 cups of water. Smells nice, as well.