The pheromone secreted by some larvae can help keep the ants away in a compost bin. Alternatively, you can try circling some chalk, lime or diatomaceous earth around your bin. If you want a more drastic approach, elevate the bin on some rocks & spray some ant deterrent on the stones lying beneath.

Let's see some good ways to prevent ants from getting in the compost pile the next time around:

Preventing Ants From Getting in the Compost

Tip #1: Start Small

Kitchen scraps (especially those with a high sugar content) may attract a lot of ants right from the beginning but not some other decomposer species. A good tip if you're beginning with this composting thing is to start first with a small amount.

Observe the re-actions of the microbial diversity & local insects around. Then, we can work it up from there. Too much scraps right from the start may attract extra visitors like the ants to help with the munching. Billions of them really.

If you have, for example, a sweet apple on the top of the pile, try putting it in down under or in the middle of the pile. In other words, bury it somewhere inside & spread some browns around on the top.


This distances the ants from their yummy food source. It slows down the time when the ants first get a smell of the food around & start marching in full blown. It gives us some more time to deal with them.

Tip #2: Onion

Also, if you know the ants may come, try the onion recipe. This one is super easy to prepare. Chop up some onion & soak them in water for a few days. Extract that juice to spray around your compost bin as needed.

In the onion, there's some amount of sulfur (noticeable by its characteristic smell). This helps keep the ants away safely. If you don't like using onions, try mustard or garlic. These also contain the same powerful content like onion.

Tip #3: Microbe

The third way we can try is using the little microbes to help us shoo the ants away. If we increase the amount of good microbes or good allies for our compost from the start, there may be little room, food, or oxygen left for the ants to live there.

To do this, you can use the liquid from fermenting fruits or veggies. Or in Korean Natural Farming, they call it FPJ - fermented plant juice. In it, there's a ton of beneficial microorganism that can help break down the food faster & leave little to none for the little ants (sorry guys you're late).

For example, to make this juice we can mix:

  • 1 part sugar
  • 3 parts organic matter
  • 10 parts water

Ferment this mixture in shade with a lid on for about 2-3 months (it takes some time). Then, use the juice to spray around your box or pile.

In this liquid, there's some very light alcohol amount, organic acids & lots of enzymes. These enzymes help break down the starch (the sugars), the cellulose in fruits & veggies fast. So the ants and other pests have little chance to get some foods when/if they come. The idea is to have something to eat up the food faster before the ants.

Together with the microbes living in the collected liquid, we may have a little army of eaters that can chew up/decompose the foods faster than ants. The Saccharomyces, a type of good bacteria, will take care of the starch for you. The Streptomyces, a good fungi, will work its magic.

If you don't want to wait months for this stuff, try mixing bread yeast (which contains a good bacteria guy called Saccharomyces) with water & spray it around your box. Sourdough bread yeast that contains the lactic acid bacteria also works. It helps keep the smell down & the ants away.

The above recipe (1:3:10 ratio) is good for multiplication if you want to harvest a little army of microbes for future composting uses.

The 1:3:10 ratio is also used in making garbage enzyme. It's a liquid good for many uses like fertilizing, cleaning and beauty purposes. To find out more, you could check out:

And lastly, going towards the final tip:

Tip #4: Black Soldier Fly

If you're raising black soldier flies BSF (an incredibly fast decomposer), then collect some of their leachate or effluent. This is the juice that gets discharged from the BSF castings. It's similar to worm tea in a way. A good benefit of this effluent is its powerful deterrent to pests and houseflies.

Gradually, as your BSF population increases and develops a stronger smell of their specie, other little creatures like ants, houseflies or pests will also naturally disappear. This brings back the balance in the natural bio system. You won't need to use any undesirable ant killers in this case. The effect is also more sustainable & longer-lasting.

So the two basic ideas from some ways we've seen above are: to outnumber the ants or to be faster than them.

Goodbye Antsy Ants

Starting small helps you to see the re-actions of the local microbes & leaves little excess food for any ants around. Try the onion recipe or the enzyme mix. It's easy to do & it works well.

Hope this brief post has given you one or two ideas on how to keep the ants away from your compost bin. Share with us your great composting tips. Thanks for tuning in & See you again next time.

Share or pin this post!

how-do-i-get-rid-of-ants-in-my-compost-pin

Cover image source