Four things realistically leave droppings in a kitchen cupboard: mice, cockroaches, pantry beetles and moth larvae. Size sorts them. Anything 3 to 7 mm and tapered is mouse; 1 to 2 mm blunt and ridged is cockroach; anything finer than that is insect frass mixed with product dust. Before working through the list, apply the uniformity test, because a large share of what gets found in cupboards is crumbs, spice fragments and shelf-liner debris.
- Uniform size means one animal. Varied size means debris.
- Which shelf matters. Mice work low and along edges; moths and beetles are in the packets.
- Empty the cupboard. There is no version of this that skips that step.

A cupboard is a confined space with food in it, so it collects both pests and the debris that looks like pests. The first job is deciding which you have, and it is quicker than working down a species list.
The test that comes first
Tip a sample onto white paper and look at it beside a ruler.
Uniform in size and shape means it came out of an animal, because one animal produces one size. Proceed to identification.
Varied in size, with some pieces angular or fibrous means debris: crumbs, ground spice, dried herb, fragments of shelf liner, coffee, or the black grit that gathers in any joint. This is the commonest outcome and it ends the investigation.
Our page on tiny black specks and what they turn out to be covers the non-pest candidates in more detail.
The four candidates
Mice. 3 to 7 mm, dark, tapered at one or both ends. Found along the back edge of a shelf, in corners, and characteristically on the lowest shelf, because mice arrive from floor level via the cupboard carcass rather than from above. Alongside them you will usually find gnawed packaging corners and sometimes a musky smell. UC IPM’s guide to the house mouse covers the behaviour that produces that pattern, and mouse droppings and what to do covers the cleanup.
Cockroaches. Under 1 mm for German cockroach, 2 to 3 mm for the larger species, blunt ended with ridged sides. Concentrated in corners, in hinge recesses, and around the cupboard’s fixings rather than on the open shelf, because that is where the insects rest. Often accompanied by a faint musty smell. See cockroach droppings and UC IPM on cockroaches around the home.
Pantry beetles. Their frass is very fine, pale to mid brown, and mixed indistinguishably with flour or product dust, so it reads as a slightly gritty film rather than as discrete droppings. The finding that identifies it is not the frass but the beetle: small, hard shelled, and usually in the packet rather than on the shelf. Tiny bugs in kitchen cabinets works through the species.
Pantry moth larvae. Frass is fine and pale, and it comes bound up with silk webbing, which is the diagnostic feature. Clumped grains, a silk mat inside a bag, or fine threads across the underside of a shelf all point here. Larvae leave the food to pupate and are frequently found on the shelf above, or on the ceiling of the cupboard.

Where it is tells you a great deal
Lowest shelf, along the back edge, with gnawed packaging. Mouse.
Corners and recesses of any shelf, with nothing touched. Cockroach; they are feeding on residue and grease rather than on stored food.
Inside a packet, with the packet intact. Beetle or moth, and it started before the packet came into the house.
Underside of the shelf above, with webbing. Pantry moth, at the pupation stage.
That last one surprises people. Larvae crawl upward and away from the food before pupating, so evidence appears at a distance from the source. Bugs crawling on the ceiling covers the same behaviour.
The search, which is also the treatment
There is no shortcut and no spray that substitutes for it.
Take everything out. Every packet, jar and tin onto the worktop. Check each one over a white surface, opening anything opened before, looking for live insects, webbing, clumping or fine dust. Discard anything infested, sealed in a bag, into an outside bin.
Vacuum the empty cupboard, paying attention to shelf-support holes, hinge recesses, the joint between shelf and carcass, and the gap at the back. Then wipe with detergent. Skip the crevices and the problem returns from them.
Transfer everything that stays into glass or rigid plastic with a real seal. This is the step that ends the recurrence, because most pantry beetles and moth larvae chew straight through paper, card and thin film. Damaged food packaging covers what the failed packets look like.
If the finding was mouse rather than insect, the cupboard is a symptom and the entry point is the problem: gaps around pipework under the sink, the void behind the kickboard, and the gap where the carcass meets the wall. Under the kitchen sink covers that space.

Common questions
Everything is sealed and I still find specks. Then look at the shelf itself rather than the food. Cockroaches live on residue and need no access to stored goods at all.
Is the food beside it safe? Anything in a gnawed or pierced packet goes. Sealed glass and metal are fine, washed on the outside.
How long has this been going on? Fresh mouse droppings are dark and soft, and dull within a couple of days. A deposit that is uniformly grey and crumbly with nothing new is historic.
Nothing came back after I cleaned. Then it was historic or the source packet went out with the clearance. Clean, note the date, and check in a week before concluding.
The bottom line
Uniformity first, size second, position third. That sequence gets most kitchen cupboard findings to an answer in a couple of minutes, and it rules out debris, which is the likeliest result. When it is real, the cupboard has to come out onto the worktop, because every one of the four candidates is found by looking in the packets rather than at the shelf.