Every New Yorker has seen it — a rat nosing through a potato chip bag on the subway tracks, a pigeon dodging traffic while pecking at a pizza crust, a squirrel diffidently approaching the remains of a turkey sandwich abandoned on a park bench. But it turns out that these enthusiastic garbage collectors are not the only animals cleaning up the mess we make.

A new study, published Tuesday in the journal Global Change Biology, has found that millions of tiny insects are also picking up after us, potentially consuming the equivalent of 60,000 frankfurters a year — and that just on a stretch of 150 blocks of median strips in Manhattan.

During the summer of 2013, researchers working in parks and on street medians in Manhattan measured temperature and humidity and sampled the population of arthropods — ants, millipedes, mites, spiders and others. Among other things, they were interested in finding out what effect the flooding caused by Hurricane Sandy had had on the city’s fauna.

To establish the diversity of species at each site, they sifted through the leaf litter and sucked ants into an aspirator by hand. They extracted 16,294 bugs, including representatives of 32 species of ants.