How to Get Rid of Flies Around a Compost Heap


Compost is made from piling organic matter, such as leaves and vegetable scraps, into a certain area or container. After a while, the pile naturally breaks down into soil-like matter that is used as a soil amendment and fertilizer. The decomposition process is helped by natural bacteria, insects and earthworms. However, if too much moisture is available or the wrong type of organic material is added to the pile, a large number of flies may suddenly appear over and around the compost pile. Too many flies can also be caused by adding fresh manure or vegetable scraps to the pile without adding enough dry matter.

Step 1

Turn the compost pile once to redistribute the organic matter in the pile with a garden fork. Simply move the organic matter at the bottom of the pile to the top of the pile. This buries any fly larvae that may be ready to hatch or that have hatched.

Step 2

Add dry organic matter to the compost pile such as hay, dry leaves or wood chips. Turn the pile once again to incorporate the dry matter into the pile. This dries out the pile, removing excess moisture, and adds carbon matter. Do not add water to the pile after adding the dry matter until the fly problem goes away.

Step 3

Sprinkle a layer of soil about 1/2 inch thick over the top of the compost pile. This buries all fly larva and makes the pile inaccessible to the flies. Once the flies are no longer visible, turn the pile and incorporate the dirt into the pile. The dirt contains microorganisms that help the compost pile decay rapidly. The dirt also helps soak up any excess moisture in the pile that may be attracting flies.

Things You'll Need

  • Dry leaves
  • Wood chips
  • Soil
  • Garden fork
  • Shovel


  • Cornell: Troubleshooting Compost Problems
  • Living With Bugs: Insects and Composting
  • CaL Recycle: Compost Pile Critters
Keywords: compost piles, compost problems, compost flies

About this Author

Based in Rockdale Texas, Jim Gober has been writing garden-related articles for 25 years. His articles appear in several Texas newspapers including The Rockdale Reporter, The Lexington Leader, The Cameron Herald and The Hearne Democrat. He is a Master Gardener and Certified Texas Nursery and Landscape Professional. He holds bachelor degrees in English Writing from St. Edward's University and Finance from Lamar University.