Why Do Flies Like Garbage?

When a fly spots a rotting pile of garbage, it may land there for two reasons: food and egg-laying. Flies are attracted to sweet or fermented liquid in the trash.

Aug 5, 2023By Colt Dodd
why do flies like garbage

A dumpster is basically the fly version of a refrigerator. Fermenting liquid, rotting produce, and animal waste draw all types of flies, from drain flies to bloat flies. But why?

For one thing, no living thing gives up the chance for free food. Also, flies want to lay their eggs in warm places where the larvae will hatch surrounded by food. The larvae will hatch into maggots, feed off the waste, and grow into flies.

Flies Are Decomposers

a housefly on a leaf
Image Credit: Wikimedia Commons

Per National Geographic, there are three main types of living things: producers, consumers, and decomposers. Flies fall into the latter category. They don’t hunt prey or rely on predatory tactics. Instead, their job is to find rotting garbage and break it down through digestion.

Other animals that are decomposers include:

  • Mites
  • Snails
  • Slugs
  • Beetles
  • Ants
  • Earwigs

The San Diego Department of Public Health notes that millipedes are also decomposers. While some may turn up their nose at an insect that eats decaying matter, these critters play an important role in regulating the environment.

The Two Main Reasons Why Flies Like Garbage

a fly on a flower
Image Credit: Wikimedia Commons

Imagine that a fly lands on a half-eaten hamburger. The fly will regurgitate digestive juice onto the food, which breaks it down into small digestible chunks that the fly will suck up into its proboscis. But flies won’t just eat anything, however. They crave organic decaying material––and what better place to find that than in a trash can?

Flies also want their young to start life on the right foot. So, they lay their eggs where their larvae will have a meal ready upon hatching. Flies aren’t too particular about where they lay their eggs––they even lay their eggs in animal waste. In a fly’s world, dog doo is a nutrient-rich paradise, and its spongey material is perfect egg-laying territory.

What Attracts Flies to Garbage?

a fly_s eyes up close
Image Credit: Wikimedia Commons

The short answer is that, like most animals, flies rely on their sense of smell to navigate the world around them. The long answer is a bit more complicated.

According to CalTech, flies’ “noses” are actually two antennae coated with thin hairs called “sensilla.” Neurons are inside the sensilla. When a fly smells something, the odor binds to the sensilla which transmits information to the brain.

Surprisingly, flies don’t have a great sense of smell. They only have 50 odor receptors, while humans have anywhere from 400 to 500. Elephants have the most refined sense of smell in the animal kingdom, having 2,000 distinct genes just for smelling alone.

How to Repel Flies Naturally

a fly eating a leaf
Image Credit: Wikimedia Commons

While flies play an important role in regulating the ecosystem, most people can’t send the swarming and the buzzing. What’s more, per the Centers for Disease Control and Prevention (CDC), flies can carry many diseases that endanger human life, such as food poisoning and dysentery.

One can repel flies by:

  • Cleaning the inside of the garbage cans. Food residue can build up inside trash cans, acting as a magnet for flies on hot days. One should periodically hose down the inside of their garbage cans to prevent attracting pests.
  • Regularly cleaning the home’s interior. By regularly mopping, vacuuming, and wiping down the counters, one can reduce the odors that would attract flies.
  • Relying on natural scents. Flies can’t stand the smell of peppermint, citronella, eucalyptus, and geraniol. Using these and other essential oils can reduce flies and other nasty infestations.

Here’s a word of advice: don’t use pesticides. They can cause illnesses in pregnant women, children, and pets. This was recently evidenced by the lawsuits against Roundup, a once-popular weedkiller. Litigants claim that the product can cause cancer and other life-altering illnesses.

Pesticides also don’t address an infestation at its core. It serves as a poisonous Band-Aid that never yields a permanent resolution.

Frequently Asked Questions About Flies

a fly on another leaf up close
Image Credit: Wikimedia Commons

Despite their size, flies are impressive creatures. Here are some questions readers may have about this:

How Long Do Flies Live?

Flies are here for a good time, not for a long time. In general, they live about 28 days. They spend that time eating, flying, mating, laying eggs, and eating some more. The longest-living insect was a black ant queen, who lived for 28 years!

Do Essential Oils Repel Flies?

Yes. However, one should never apply an essential oil directly to the skin without diluting it first. Direct contact with the skin can cause allergic reactions, pain, and inflammation. If one wants to use this route, they should apply the oils to lawn chairs, the outside of trash bins, and on fence posts.

up close fly against a white background
Image Credit: Wikimedia Commons

Where Do Flies Live?

Flies live on every continent, but they’re most common where people are. Per Colorado State University, they’re common in areas where there’s garbage, animal waste, and other decaying matter.

Can Flies Bite?

Other than transmitting disease, flies, for the most part, aren’t dangerous. For instance, the common housefly doesn’t have teeth and can’t bite. As noted, it relies on its proboscis to break down solid food into liquid.

However, some flies, like the deerfly and horsefly, do bite. They have scissor-shaped mandibles that allow them to cut into human skin and lap up the blood. Per the Illinois Department of Public Health, this is a crude way of extracting blood, so getting bitten by one of these flies is usually painful.

What Would Attract Flies to Humans?

Contrary to popular belief, not bathing doesn’t attract flies. Instead, flies are naturally drawn to the carbon dioxide that humans breathe out. They’re also attracted to dead skin cells, open wounds, and oily hair.

Colt Dodd
By Colt Dodd

Colt Dodd is a sighthound enthusiast with three years of freelance writing experience. He has an Italian greyhound/Shetland sheepdog mix named Homer. In his spare time, he enjoys going to dog parks and writing fiction.