How to Get Rid of Fruit Flies in a Trash Can
Empty, wash, and dry the trash can, then remove nearby food scraps that can attract fruit flies. Traps can catch adults, but cleaning the breeding source helps prevent them from returning.
On this page (6 sections)
- How do you get rid of fruit flies in a trash can?
- Where are fruit flies breeding around the trash?
- How do you keep fruit flies from coming back?
- Which trash can features help limit access to scraps?
- When should you check for a different trash-can problem?
- What is the best routine for a fruit-fly-free trash area?
To get rid of fruit flies around a trash can, remove the trash, wash away food residue, and dry the can completely. Then clear nearby scraps and use a trap near the problem area to catch adult flies while you prevent new ones from breeding.
Fruit flies can persist even after the bag is gone if juice or food bits remain under the rim, around the lid, or on the floor. Start by cleaning the source, then make small changes to how you store and discard scraps.
How do you get rid of fruit flies in a trash can?
Empty the can and wash every surface that could hold food residue. A new bag alone won't help if scraps or sticky liquid remain on the bin.
- Tie the trash bag closed and take it outside.
- Check the can's bottom, rim, lid, and hinge for spills or scraps.
- Wash those areas with hot water and dish soap.
- Rinse away soap, then dry the bin and lid fully.
- Put in a fresh bag and keep the lid closed between uses.
Wash the floor beneath the can if anything leaked. If you use a removable inner bucket, clean and dry that too before putting it back.
Avoid mixing cleaning products, especially bleach with ammonia or acidic cleaners. Use one product at a time and follow its label.
Where are fruit flies breeding around the trash?
Look for damp scraps and sticky residue near the can, not just inside the bag. Fruit flies may also gather at a sink drain, compost container, recycling bin, or fruit bowl.
Pull the can away from the wall and check the floor and nearby cabinet edges. Look at the underside of the lid and around hinges, where splashes can be easy to miss.
Rinse cans and bottles before putting them in recycling if they held juice, soda, or other sweet liquids. Keep ripe fruit covered or refrigerated while flies are active.
Should you use a trap near the trash can?
A trap can catch adult fruit flies near the source, but it doesn't replace cleaning the can. Put it beside the problem area and follow the product directions.
The TERRO Fruit Fly Trap uses liquid bait and has a monitoring window to check catches and lure levels. TERRO says each trap provides up to 45 days of protection.

A ready-to-use liquid-bait trap for catching adult fruit flies near the trash area.
See it on AmazonKeep the trap away from food preparation surfaces, and place it where children and pets can't reach it. Continue removing scraps and residue so new flies have fewer places to gather.
How do you keep fruit flies from coming back?
Keep food scraps sealed and the can clean and dry. Regular small cleanups can prevent the residue that draws flies back.
- Take out wet or fruit-heavy trash promptly.
- Close the lid after each use.
- Wipe spills as soon as they happen.
- Rinse food containers before recycling.
- Wash the can when residue appears, then dry it before replacing the bag.
If flies remain, check other sources in the kitchen instead of relying only on the trash can. The sink drain, compost, and produce storage can all need attention.
For persistent odors that make scraps harder to ignore, see our guide on how to get rid of a smelly kitchen trash can. A clean can is easier to maintain when its lid and pedal area are also kept free of grime; our guide explains how to clean a simplehuman trash can.
Can a plug-in trap help with flies near the trash?
A plug-in trap may help catch flying insects gathered near the bin. Place it close to the source, with the light visible, and follow its instructions.
The Zevo Plug-In Flying Insect Trap uses blue and UV light to attract flying insects to an adhesive cartridge. It has a blinking light reminder to check the cartridge every six weeks.

A plug-in adhesive trap for catching flying insects near a trash bin or fruit bowl.
See it on AmazonThis trap catches adults, so keep removing food residue and damp scraps. If you use a trap near food, choose a spot that stays clear of food and kitchen work surfaces.
Which trash can features help limit access to scraps?
A lid can help cover scraps between trips to the bin, while regular cleaning still matters. Choose a can that suits your kitchen and that you can empty and wash without trouble.
The EKO Madison is a 13.2-gallon step can with a lid lock and a removable inner bucket with handles. Its lid is designed to close quietly, and the bucket can make bag changes easier.

A lidded step can with a removable inner bucket for easier emptying and cleaning.
See it on AmazonFor a hands-free lid, the iTouchless 13-gallon sensor can has a manual pet lock and an odor filter. Keep the lid area clean and check the bin for spills as part of routine upkeep.

A sensor can with a manual pet lock and odor filter for a kitchen where you want hands-free access.
See it on AmazonA lid helps limit access, but it won't prevent flies if food or liquid stays inside. See the best kitchen trash cans for odor control if you're comparing cans for a cleaner kitchen routine.
When should you check for a different trash-can problem?
Fruit flies are small flying insects; maggots are fly larvae and need a different cleanup response. If you see larvae in the trash, remove the bag and clean the can promptly.
Keep the bag from sitting in the bin after it fills, especially when it holds wet food scraps. Our guide on how to stop maggots in a kitchen trash can covers that problem.
If the flies keep returning after you clean the can, inspect the rest of the kitchen for another breeding source. Clean drains and containers according to their instructions, and remove overripe produce.
What is the best routine for a fruit-fly-free trash area?
Take out scraps, rinse sticky containers, and clean residue before it builds up. Use a trap nearby to catch adults while you maintain those habits.
Choose the TERRO trap if you want liquid bait near a fruit-fly gathering spot, or the Zevo plug-in if you prefer an adhesive cartridge with a reminder light. A lidded can can cover scraps between uses, but regular cleaning is still the key step.
For a broader kitchen setup, compare kitchen trash cans with lids and different sizes. Keep the bin dry, the lid closed, and food residue out of the area around it.
Frequently asked questions
What is the fastest way to get rid of fruit flies in a trash can?
Empty the trash, tie the bag closed, and wash the can with hot water and dish soap, including the lid and rim. Dry it fully before putting in a fresh bag.
Remove nearby produce scraps and rinse sticky recycling, then use a trap near the area to catch remaining adults.
Why are fruit flies around my trash can?
Fruit flies gather where ripe produce, fermenting scraps, or sticky residue provide food and a place to breed. A small spill under the bag rim or residue in a lid hinge can keep attracting them after you take the trash out, so inspect and clean those spots too.
Do lidded trash cans stop fruit flies?
A closed lid can reduce access to food scraps, but it won't remove residue or larvae already inside the bin. Empty the can regularly, clean spills, and keep the lid closed between uses.
Check the hinge and rim because crumbs and liquid can collect there.
Where should I put a fruit fly trap?
Place a fruit fly trap near the area where flies gather, such as beside the trash can or fruit bowl, while keeping it away from food preparation surfaces. Follow the trap's directions, and keep cleaning the source so the trap is not the only step.
About this guide: Our look at getting rid of fruit flies around a trash can draws on maker specs, materials and what owners report. See how we research.



