That small, worm-like bug you found is almost certainly a larva, the immature stage of an insect. The most common culprits are carpet beetle larvae, drain fly larvae, pantry moth caterpillars, or fungus gnat maggots. Where you spotted it is the single best clue to figuring out which one you’re dealing with.
Found on Floors, Carpets, or Near Clothing
Carpet beetle larvae are one of the most common “worms” people find crawling across floors, baseboards, or closet shelves. They’re slow-moving, fuzzy, and carrot-shaped, typically light brown to dark brown or blackish. Depending on the species, they range from about 3/16 inch (5 mm) to just under 3/8 inch (10 mm) long. The varied carpet beetle larva has alternating light and dark brown stripes and is wider at the rear, narrowing toward the head. Black carpet beetle larvae are covered in short hairs with long bristles at the tail end.
You’ll often find their shed skins mixed in with lint and dust, especially beneath rug edges, along baseboards, or in the back corners of closets. They avoid light and actively feed in dark cracks, crevices, and fabric folds. Their diet includes wool, silk, feathers, pet hair, and other animal-based fibers. A single female beetle can lay up to 100 eggs, and larvae can take anywhere from three months to three years to fully develop, so an infestation can persist for a long time if left unchecked.
To deal with them, vacuum thoroughly along carpet edges, under furniture, and inside closets. Wash or dry-clean any affected fabrics. Storing woolens in sealed containers or bags prevents reinfestation.
Found in the Bathroom, Shower, or Near Drains
Drain fly larvae are legless, gray, about 3/8 inch (8 to 10 mm) long, and darker at both ends. They have a small breathing tube at one end that pokes through the slimy buildup inside pipes. If you’ve seen tiny moth-like flies hovering near your sink or shower, these larvae are their offspring, living inside the biofilm that coats the walls of wet drainpipes. The larval stage lasts 8 to 15 days before they pupate and emerge as adults.
Getting rid of them means removing the slime they live in. Start by physically cleaning the drain: use a small plastic drain snake to pull out hair, soap scum, and gunk. If you can access the curved pipe section under the sink, remove and scrub it. Then treat the drain with a mixture of half a cup each of baking soda and salt, followed by a cup of vinegar. Let it sit overnight, then rinse with hot (not boiling, which can crack porcelain or damage PVC) water. An enzyme-based drain cleaner works well too, since it breaks down the organic buildup that larvae feed on.
Treat every drain in the house, not just the ones where you’ve seen flies. Cover or plug drains when not in use to prevent adults from laying new eggs. You may need to repeat the process several times over a week or two to catch newly hatching larvae, similar to how you’d treat lice through multiple rounds.
Found in Food, Cereal, or the Pantry
Indian meal moth larvae are whitish caterpillars, about half an inch long, with a brown head. The first sign of an infestation is usually webbing or small crawling “worms” inside a box of cereal, a bag of flour, or a container of spices. They leave behind sawdust-like droppings called frass. These larvae eat grain products, cereals, pasta, dried fruit, nuts, spices (especially red pepper and paprika), dry pet food, and birdseed. They’ll sometimes infest dried flowers too.
The adult moth is easy to recognize: about 5/8 inch long, with wings that are reddish-copper on the outer half. If you see these moths fluttering around your kitchen, larvae are already present somewhere in your stored food. Inspect every container of dry goods carefully. Discard anything with webbing, larvae, or frass. Store remaining food in airtight glass or hard plastic containers to prevent reinfestation.
Found in Potted Plant Soil
Fungus gnat larvae are pale, translucent worms with a distinct black head, about 1/4 inch long when mature. You’ll find them in the top layer of moist potting soil, where they feed on decaying organic matter and fungi. In most home settings they don’t cause significant plant damage, though heavy infestations can nibble at root hairs. The adult gnats are tiny, dark flies about 1/8 inch long that hover around the soil surface and are attracted to light.
Letting the top inch or two of soil dry out between waterings is the simplest fix. The larvae need consistently moist conditions to survive. Yellow sticky traps catch the adults and help you gauge whether the population is declining.
How to Tell Larvae Apart at a Glance
The quickest way to narrow things down is to look for legs. Caterpillars (like pantry moth larvae) have both small segmented legs near the head and fleshy, stubby prolegs along the abdomen, with five or fewer pairs of prolegs. Carpet beetle larvae have three pairs of tiny segmented legs near the head but no prolegs, plus visible hairs or bristles covering their body. Drain fly larvae and fungus gnat maggots are completely legless.
- Fuzzy, carrot-shaped, with bristles: carpet beetle larva
- Gray, legless, found in drain slime: drain fly larva
- White with brown head, in food or webbing: Indian meal moth larva
- Pale with black head, in damp soil: fungus gnat larva
Could It Be an Actual Worm?
In rare cases, the “worm” is actually a worm. Pinworms are tiny parasites, about 1/4 to 1/2 inch long, white or light gray, and thin enough to look like small pieces of thread. They’re sometimes found on bedding, underwear, or around the anus, particularly at night when female pinworms emerge to lay eggs. The hallmark symptom is intense anal itching, especially at bedtime, which can disrupt sleep. Pinworms are very common in children and spread easily in households. They require medication to treat, not cleaning strategies alone.
If what you found doesn’t match any insect larva description and you or a family member is experiencing itching, a pinworm infection is worth considering. A simple tape test, where clear tape is pressed against the skin near the anus first thing in the morning, can pick up eggs for identification.