Flies in the Kitchen Trash Can? Tight Lids and Habits That Stop Them
Flies lay eggs on food scraps and the maggots hatch within a day or two. Clean the can, bag the scraps, and use a lid that seals to keep them out.
By Jamilur Rahman Updated November 5, 2026 · 6 min read
- Time
- 30 min
- Cost
- $20-$50
- Difficulty
- Easy
In this guide
Quick answer
To prevent flies in a kitchen trash can, give them nothing to lay eggs on and no way in. Bag food scraps tightly, empty the can every two or three days (daily for meat and fish) and wash it with hot soapy water. A kitchen trash can with a tight-sealing lid keeps new flies out after the can is clean.
Free fix vs. permanent fix
Bag it, empty it, wash the can
- Tie wet scraps in a small bag before they go in the can
- Empty the can every two to three days
- Wash it with hot soapy water and let it dry fully
- Freeze meat and fish scraps until trash day
How long it lasts: As long as the habits stick. Flies find a gap in a loose lid within days if scraps sit out.

A step-on can with a tight-sealing lid
Flies follow food smells and squeeze through gaps or wait for the lid to open. A step-on can with a lid that closes flush stays shut even when your hands are full. The cleaning removes what is in there now, and the lid keeps new flies out.
What to get: Step-on kitchen trash can with a tight-sealing lid
How long it lasts: Years. A lid that closes flush keeps flies away from the scraps between trash days.
As an Amazon Associate I earn from qualifying purchases.
What you'll need
-
Rubber gloves
For emptying and scrubbing the can
You have it -
Dish soap and hot water
Cuts the grease and slime that attract flies
You have it -
Small bowl, cider vinegar and dish soap
A quick trap for fruit flies and gnats
You have it -
Freezer bag
Holds meat and fish scraps until trash day
Free - Our pick Illustration

Step-on kitchen can with a tight-sealing lid
Keeps flies out once the can is clean
- Illustration

Countertop food scrap bin with a locking lid
Holds the wettest scraps, the favorite of flies, in a sealed bin
Why it happens
Food scraps left uncovered
Flies smell rotting food from far away. Loose scraps on top of the bag give them a place to lay eggs.
Warm, wet trash
Heat and moisture speed everything up. Fly eggs can hatch into maggots in about a day in warm weather.
A loose, cracked or open lid
A lid that sits crooked or splits at the edge is an open door. An overfilled can that will not shut is worse.
Residue in the bottom of the can
Juice from a leaking bag collects under the liner. Eggs laid in that slime survive bag changes and hatch next week.
Try this first (free)
Do these in order, starting with the simplest.
-
Empty and wash the can
Tool used: Rubber glovesWear gloves, scrub the can and the underside of the lid with hot soapy water, rinse, and let it dry in the air. Never mix bleach with vinegar or ammonia.
-
Clear any maggots
Tool used: Dish soap and hot waterTip them into a bag, tie it and put it in an outdoor bin. Rinse the empty can with very hot water, then scrub it with soap.
-
Freeze the worst scraps
Tool used: Freezer bagPut raw meat trimmings, fish and bones in a freezer bag in the freezer. Move them to the can on trash day.
-
Keep the bottom dry
Lay a few sheets of newspaper or paper towel under the liner to soak up leaks. Tie the bag at two-thirds full so the lid can close.
-
Trap the stragglers
Tool used: Small bowl, cider vinegar and dish soapSet a bowl with an inch of cider vinegar and a drop of dish soap near the can. Fruit flies and gnats drown in it. Replace it every few days.
-
Switch to a can that shuts tight
Tool used: Step-on kitchen can with a tight-sealing lidIf flies are back within a week, the lid is the leak. Use a step-on can with a lid that closes flush.
Illustration
Check price on AmazonTool for this step
Step-on kitchen can with a tight-sealing lid · Keeps flies out once the can is clean
When free fixes aren't enough
If flies return within a week of a good clean, look at the lid. A lid that sits crooked, splits at the edge or leaves a gap at the hinge lets them in, and so does a can that is too full to shut. A can with a lid that closes flush on a steady pedal removes the way in. If you see flies in several rooms, or maggots in a spot away from the trash, the trash is not the source. Check drains and plant soil, and call pest control if you suspect something dead inside a wall.
Buy the fix
Still stuck after the free fixes? These are the products we would look at.
| Pick | Product | Fixes | Who it's for | Buy |
|---|---|---|---|---|
| Best pick | ![]() Step-on kitchen trash can with a tight-sealing lid | flies and maggots getting into the can between trash days | Anyone who cooks often, has a warm kitchen, or keeps meat and fruit scraps in the can. | Check price |
| Budget pick | ![]() Countertop food scrap bin with a locking lid | wet scraps that feed flies sitting in the main can | Someone who wants the cheapest sealed place for scraps while the main can gets cleaned. | Check price |

Step-on kitchen trash can with a tight-sealing lid
Fixes: flies and maggots getting into the can between trash days
Look for: A lid that closes flush with no gap you can see; A solid pedal and a hinge that does not wobble, according to reviews; A removable inner bucket you can wash; A size that fits the bags you already buy.
- Who it's for
- Anyone who cooks often, has a warm kitchen, or keeps meat and fruit scraps in the can.
- Honest downside
- Your current can already seals well. Then the cleaning and scrap habits will do the job.

Countertop food scrap bin with a locking lid
Fixes: wet scraps that feed flies sitting in the main can
Look for: A lid that clamps or locks shut; A body that is easy to rinse and dry; A size you will actually empty daily.
- Who it's for
- Someone who wants the cheapest sealed place for scraps while the main can gets cleaned.
- Honest downside
- You do not cook at home much, or you already freeze your scraps.
As an Amazon Associate I earn from qualifying purchases. We don't show prices because they change, so use the button to see today's price.
How we picked: How we picked: this page is based on pest-control and kitchen hygiene guides, product instructions from trash can makers, and what owners report in reviews. We do not test products by hand.
House flies, fruit flies or drain flies? Match the fix
- House flies: larger, about a quarter inch. They lay eggs on meat, fish and garbage. Bag and freeze scraps and seal the lid.
- Fruit flies and gnats: tiny, hover over ripe fruit and sweet spills. Use the vinegar trap and keep fruit in the fridge.
- Drain flies: small, fuzzy and moth-like, near drains. They breed in drain slime, not in the can, so clean the drain.
What to skip
What to skip: sprays and chemical mixes
Spraying insecticide into a food-waste can only clears flies for a day, leaves residue near food and does nothing about the scraps. Never mix bleach with vinegar or ammonia, which makes toxic gas.
Frequently asked questions
What kind of kitchen trash can keeps flies out?
How do I prevent maggots in a kitchen trash can?
Why does my garbage can keep getting maggots?
How do I keep gnats out of a kitchen trash can?
As an Amazon Associate I earn from qualifying purchases. Affiliate disclosure