How To Get Rid Of Flies In Your Trash Can

Flies, one of the most annoying insects on the earth, are attracted to trash cans, but there is no way around that!

Garbage cans are full of wasted food, rotting meat, fruit, and other organic matter that flies will want to lay eggs in.

In this post, we will take a look at some things you can do to get rid of flies around your trash can and keep them out.

Let’s take a look.

How To Get Rid Of Flies In Your Trash Can

Get Rid Of Flies In Your Trash Can – Step By Step Process

Below are the steps to get rid of flies in your trash can:

  1. Remove everything from your trash can.
  2. Take a spray bottle and fill it with tap water and white vinegar in equal parts.
  3. Spray the trashcan inside and out, including the lid, and any flies you see cruising around the bin.
  4. Let the solution sit for about 15 minutes.
  5. Wipe down your entire trash can with a clean dishcloth.
  6. Take about a cup of baking soda and sprinkle it around the inside of your trash can and leave it covered overnight. This will take care of any other odors that had brought the flies in the first place.

The rest of this article will explain how flies get into your trash can and how to prevent them from coming back.

How Do Flies Get Into My Trash Can?

Your trash can is a key place for flies to thrive where it feels safe. It is protected, has food, and it’s warm. Perfect for laying eggs and for the larva to eat peacefully and grow into adult flies.

Food Waste

Moldy and decaying food attracts flies. Use a composter or use a separate trash bag. Double bag it when you bring it to your exterior trash to keep the odors contained.

What Can I Do To Prevent Them?

Use one of the following 7 options to get rid of flies inside your trash can and keep them out!

1. Fly Deterrent or an Odor Prevention Product

Odor prevention

These products prevent odors that attract flies to your trash bin. Instead, they use certain smells and chemicals that flies don’t like, which will prevent them from coming and making a home in your trash.

Odor prevention products will keep your trash can smelling fresh and keep flies away.

2. Ginger Spray


Flies hate this smell and will keep their distance when it’s in the air. Slap together three to four cups of water with a pinch of ginger powder and spray it everywhere.

On your door frames, plants, and especially your trash can.

3. Basil


Another scent that flies hate and makes it hard for them to breathe.

Keep a basil plant in your home by a window or by steeping basil leaves in water for 20-30 minutes to make a solution you can spray around your home.

4. Essential Oils

Essential Oils

Flies hate the smell of oils from certain plants, so their essential oils will also keep them away from your trash can. Whip up a concoction of clove oil, thyme oil, cinnamon oil, lemongrass oil, and peppermint oil using ten drops of each oil. Next, add two cups of vodka (unflavored) and two cups of water.

Mix it all up and spray throughout your home and your trash can to keep those pesky flying insects at bay!

5. Keep a Fan On

oscillating fan

The best way to keep flies from entering your home is to keep air blowing at their entry point, which is usually one of the doors to your home. Turn on your ceiling fan on the highest setting if you have one, and use a box fan to blow some cool air at the door you keep open the most.

This method only works as long as you have your fans running, so it’s more prudent you keep your doors closed as much as possible to conserve energy.

6. Lids

garbage lids

Keeping the lid of your trash can closed as much as possible will prevent flies from even getting in there and taking advantage of the food offerings.

If you don’t own one with a lid, you should consider getting one, buying a lid separately, or simply making a lid from wood or any available materials that could cover the top of your trash can.

Consider a garbage guard too. They are very good at keeping flies away and killing those who get in. They are designed for a controlled release to last a while too.

7. Call An Expert

pest control

An exterminator, or professional pest control expert, will have a sure and permanent way of keeping flies out of your trashcan. If the flies keep coming back or get worse, call an exterminator, and they can help you with preventative measures and permanent solutions.

They can even recommend the best odor prevention products and fly deterrents to you.


Have a fly problem in your home or exterior trashcan where some unwelcome friends have made their home? Now you know how to get rid of them and keep them away from your trash once and for all.

By getting rid of flies in your garbage can, you are also reducing the chances of getting maggots in your trash can.

As you will already know, maggots and larvae of flies. If they can’t get into your trash can, they can’t lay eggs! Therefore, you are helping to eliminate maggot infestations.

Good luck.


About the author

DIY Pest Control Enthusiast Since 1996

After spending the entire night lying awake in a cockroach-infested hotel, I have driven myself to build knowledge on all things pest control. Since then, I've tested pest control techniques to see what works and what doesn't. Now, here I am giving you all the info I have learned!

Leave a Comment