Eating healthy is difficult enough without having a fruit fly infestation on all of your fresh produce. You may often see them poking around your garbage as well, trying to get to the scraps. They can lay up to 500 eggs at a time near the surface of ripening foods–not something you want in your kitchen. Despite what their name may suggest, these pesky and extremely tiny insects don’t belong in the kitchen, especially on your fruit. Here are a few creative ways to get rid of fruit flies in your apartment:

Eliminate Them at the Source

Be sure to not leave out ripened fruit or vegetables like onions, tomatoes or potatoes. Instead, keep them in the refrigerator so that the fruit flies don’t discover them. Frequently clean out recycling bins and garbage cans, making sure that the bottoms and sides of the bins are free of any small bits of food or spilled juice.

Make Your Own Fruit Fly Trap

You can keep pesky fruit flies away by simply making your own homemade trap. You’ll need a glass or jar, a sheet of paper, tape and vinegar or fruit. First, roll a sheet of paper into a cone or funnel with a half-inch opening at the bottom. The funnel should fit snugly with no gaps along the rim of the glass–otherwise flies will be able to escape. There should be about an inch or two of space between the bottom of the funnel and the bottom of the glass. When you’re done, secure the paper with tape. Remove the funnel and pour a small amount of vinegar or fruit into the glass. Replace the funnel and wait for flies. They will be attracted to the vinegar or fruit and either drown or be trapped.

Another homemade trap you can make is with a glass. Fill a small cup with apple cider vinegar and add a few drops of dishwashing liquid. Now, all that’s left to do is wait.

Repel Fruit Flies with Rue

Rue is a shrubby plant native to Southern Europe. Not only do they make for beautiful houseplants, but they’re also perfect for warding off fruit flies. Rue has traditionally been used in folk remedies, but most find it too bitter to eat. Put this herb in your kitchen–fruit flies aren’t a fan, they hate the strong aroma of rue. But thankfully, it’s a much more pleasant smell to humans.