Small white worms showing up in your house are almost always larvae, not adult worms, and the species depends entirely on where you found them. Worms near a kitchen pantry are most likely Indianmeal moth caterpillars. Worms in bathroom drains point to drain fly larvae. Worms in houseplant soil are probably fungus gnat larvae. And if you spotted tiny white threads on bedsheets or pajamas, especially a child’s, those could be pinworms, an intestinal parasite. Each one looks slightly different, shows up in a specific part of the house, and requires a different approach to eliminate.
Pantry Moth Larvae
The most common small white worm found in kitchens is the larva of the Indianmeal moth. These caterpillars are about half an inch long, off-white with a light brown head, and their body can take on a greenish or pinkish tint depending on what they’ve been eating. You’ll find them inside food packaging, crawling on pantry shelves, or sometimes inching up walls and across ceilings as they look for a place to pupate.
They feed on an enormous range of dry goods: flour, cereal, crackers, oatmeal, cornmeal, dried fruit, nuts, chocolate, spices, herbal tea, birdseed, dry pet food, and even garden seeds. The adult moth is small with copper-brown wingtips, and a single female lays hundreds of eggs directly on food surfaces. The full lifecycle from egg to adult moth can be as short as 27 days in warm conditions or stretch to six months or longer in cooler environments, which means an infestation can quietly build for weeks before you notice larvae crawling out of a bag of rice.
Getting Rid of Pantry Moths
Start by pulling everything out of the pantry and inspecting each item. Larvae spin fine silk webbing inside food containers, so look for clumps, webs, or tiny worms in every bag, box, and jar. Throw away anything infested. If you have dry goods you want to save but aren’t sure about, place them in the freezer for a full week. That duration is enough to kill eggs and larvae that aren’t visible to the naked eye.
Once the pantry is empty, vacuum all shelves, corners, and crevices thoroughly, then wipe everything down. Store replacement dry goods in airtight glass or hard plastic containers rather than leaving them in original packaging. Pheromone traps (sticky traps designed for pantry moths) can help you monitor whether adults are still present after cleanup, but they catch males only and won’t solve the problem on their own. The real fix is removing every food source.
Drain Fly Larvae
If the worms appeared near a bathroom sink, shower drain, or floor drain, they’re likely drain fly larvae. These are small, grayish-white, and feed on the slimy organic buildup inside pipes. The adult flies are tiny (about 2 to 4 millimeters), fuzzy, moth-like insects that rest on walls near drains. Larvae develop in the stagnant film of soap scum, algae, fungi, and bacteria coating the inside of drain pipes, molting through four stages over roughly 18 days before becoming adults.
The key to eliminating drain fly larvae is destroying their food source: the biofilm lining your pipes. Common home remedies are mostly ineffective here. Boiling water cools too quickly once it hits cold pipes and doesn’t dissolve biofilm. Bleach kills surface bacteria but rinses away before it penetrates the sludge layer, and it can corrode metal drains. Baking soda and vinegar produces a brief fizz with almost no real scrubbing power. Aerosol sprays kill the adults you see flying around but do nothing about the hundreds of eggs already laid inside the drain.
What does work is physical scrubbing combined with a biological drain cleaner. Remove the drain strainer or stopper, then run a stiff bottle brush as far down the tailpiece as you can reach, scrubbing the overflow opening too. Follow this with a biological surfactant product (sold as enzyme or bio drain cleaners) poured into the drain and left to soak overnight for at least eight hours before rinsing with hot water. Repeat weekly for the first month. You should see a visible reduction in larvae within three to seven days and full elimination within two to three weeks.
Fungus Gnat Larvae in Houseplant Soil
Tiny white worms in the soil of potted plants are almost certainly fungus gnat larvae. They have an elongated, whitish-to-clear body with a distinctive shiny black head, and they’re legless. When populations are high, they can leave visible slime trails on the soil surface that look like miniature snail tracks. The adults are the tiny black flies you see hovering around your plants.
In small numbers, these larvae are harmless, feeding on fungi and decaying organic matter in the soil. But in large numbers, they chew through roots and can stunt growth, especially in seedlings and young plants. Plant death has been documented in cases where high populations developed in consistently moist, organic-rich potting mix.
The simplest fix is to let the top inch or two of soil dry out completely between waterings. Fungus gnats thrive in constantly wet conditions, and drying the surface kills larvae and makes the soil inhospitable for egg-laying adults. Yellow sticky traps placed near the soil surface catch adult gnats and help reduce the breeding population. For severe infestations, a soil drench with a product containing the naturally occurring bacteria Bacillus thuringiensis israelensis (sold as “Mosquito Bits” or similar) kills larvae without harming plants.
Pinworms on Bedding or Clothing
If you found tiny white thread-like worms on pajamas, underwear, or bedsheets, particularly a child’s, you may be looking at pinworms. These are intestinal parasites, not household pests, and they’re extremely common in school-age children. Pinworms are about a quarter to half an inch long, white or light gray, and thin as a thread.
Female pinworms migrate out of the intestine at night to lay eggs around the skin of the anus, which causes intense itching. That itching is the hallmark symptom. Children scratch, get eggs under their fingernails, and reinfect themselves or spread eggs to surfaces, toys, and other family members. Swallowed eggs hatch into larvae in the small intestine and mature into adult worms, continuing the cycle.
Pinworm infections are treatable with a single dose of over-the-counter anti-parasitic medication, typically repeated two weeks later to catch any newly hatched worms. The bigger challenge is breaking the reinfection cycle. Wash all bedding, towels, and pajamas in hot water on the day of treatment. Have everyone in the household wash hands thoroughly, keep fingernails trimmed short, and avoid nail-biting. Pinworms are not a sign of poor hygiene. They spread easily in any environment where children are in close contact.
Fly Maggots Near Garbage
White, legless, tapered worms found near trash cans, compost bins, or forgotten food are common housefly maggots. They’re larger than the other larvae on this list, growing to roughly half an inch, and they have no visible head. Housefly eggs hatch in about 24 hours in warm conditions, so maggots can appear seemingly overnight on any protein-rich organic waste left exposed.
Maggots near garbage aren’t a sign of infestation in the structural sense. They’re a sanitation issue. Remove the food source, clean the trash can with hot soapy water, and make sure garbage bags are sealed and taken out regularly. In warm weather, a tight-fitting lid on outdoor bins keeps adult flies from laying eggs. If maggots keep appearing inside the house, look for a hidden food source: a dead mouse in a wall void, pet food left out, or a spill behind an appliance.
How to Identify What You Have
- In dry food or on pantry shelves: Indianmeal moth larvae. Half-inch, off-white, sometimes with a pinkish or greenish tinge, often with fine silk webbing nearby.
- In or near drains: Drain fly larvae. Small, grayish-white, found in slimy pipe buildup. Adults are tiny, fuzzy, moth-like flies on bathroom walls.
- In houseplant soil: Fungus gnat larvae. Translucent white body, shiny black head, legless. Adults are small black flies near plant pots.
- On bedding or undergarments: Pinworms. Thin as thread, white, a quarter to half inch long. Nighttime anal itching is the telltale sign.
- Near garbage or rotting food: Fly maggots. White, legless, tapered body, no visible head. Appear within a day of eggs being laid on exposed waste.
Location is the single most reliable clue. Once you know where the worms are showing up, identifying the species and choosing the right response is straightforward.