Step 1: Understanding the Concept
Consumers are classified by food: herbivores eat plants, carnivores eat animals, detritivores eat dead matter.
Step 2: Earthworm
An earthworm feeds on decaying organic matter and soil humus.
Step 3: Result
It is a detritivore.
Final Answer:
The earthworm is a detritivore.
\[ \boxed{\text{(D) }\text{detrivore}} \]