Dogs shake themselves, loosening dirt from their fur. Bees rely on bristled appendages to brush away pollen.

Fruit flies toss dust off with their heads and thoraxes. “The hairs are just flicking these particles into the air right and left,” Dr. Hu said. “Like catapults.”

Some animals keep clean with less effort, Dr. Hu and his colleagues found.

Cicadas have sharp, hairlike points on their wings that catch and hold bacteria. Nanostructures on the wings stretch the cell membranes of the bacteria, causing them to pop like water balloons.

The research could help scientists develop cleaning components for autonomous devices, Dr. Hu said.