Are there extra guests in your kitchen that you didn’t invite? Are they buzzing around your fresh fruit and vegetables, or even your trash can? Maybe you left out some empty beer bottles and they’re flying around those, too? If you answered yes to any of these questions, you may have a fruit fly infestation in your home.

Here are seven things you can do to help get rid of these pests.

The first thing you need do is figure out where the flies are coming from. If they’re hanging out around any open food items, throw the food out and scrub the area clean. You can use any type of cleaner to disinfect the area. In some cases, removing their “home” can be enough to drive the fruit flies away.

After you’ve found the source of the problem, check out the drain in your kitchen sink. If it’s clogged or in need of a good cleaning, now’s the time to take care of it. Fruit flies like to live and breed in warm, damp spaces.

Don’t forget to check your trash cans for any signs of fruit fly activity. Fruit flies have been known to lay their eggs in trash cans, worsening the infestation.

If they’re swarming around your trash can or if you’d like to prevent such a situation, take out the trash and wipe down the can using a heavy duty cleaner such as bleach. Make sure the cans are completely dry before using them again.

If you still spot fruit flies hanging around, you can set a trap using things that you may already have in your kitchen. This includes any rotten or open food that attracts fruit flies. Follow these steps:

  1. Instead of tossing out the rotten or open food, put the food in a disposable container.
  2. Cover the container with plastic wrap.
  3. Poke a few holes in the wrap, place it where fruit flies congregate, and wait.

The flies should swarm to the inside of the trap. You can then dispose of them how you see fit. Repeat this process until all of the fruit flies are gone.

Have leftover red wine that you don’t plan on finishing? Use it to create a swimming pool trap for the fruit flies. Here’s how:

  1. Pour some red wine and dish detergent into a disposable container and stir.
  2. Cover the container with plastic wrap.
  3. Poke small holes in the plastic wrap. Make sure the holes are big enough for the fruit flies to get in.

The wine should attract the fruit flies, and the combination of wine and dish detergent will make it difficult for trapped flies to fly and will drown them. You can repeat this process until you no longer see any more fruit flies.

You can also try to attract fruit flies by making a vinegar trap. Here’s how:

  1. Fill a disposable container up with water.
  2. Add a few tablespoons of vinegar and sugar to the water and stir.
  3. Add a few drop of dish soap to the solution and stir.

After mixing your solution, place the container wherever the fruit flies congregate. They should be attracted to this solution and will drown once they touch the water. Continue this method until you no longer see any fruit flies.

If homemade traps aren’t working for you, visit your local hardware store and purchase a sticky fly trap. These traps work on common flies and fruit flies.

Place the trap in the problem area and dispose of it once the sticky area is full. You can replace the trap as necessary.

Hiring an exterminator should be your last resort. Although this is usually effective, it can be costly. You or your pets may also experience adverse reactions to the chemicals used to get rid of the fruit flies.

If the fruit flies return after your house has been treated, the company may treat your home again for a free or reduced rate.

Learn more: Fruit and vegetable safety »

If left untreated, a fruit fly infestation can pose potential health risks. Fruit flies are known to fly around and pick up bacteria that they then deposit onto fresh foods.

They’re particularly drawn to manure and other feces that can contain bacteria such as E. coli. They then carry the bacteria with them.

Additionally, after mating, female fruit flies inject batches of eggs into fresh fruit. This contaminates the fruit.

To prevent future infestation, be sure keep food storage areas clean and dry. Don’t leave out fresh food once it’s been opened or after you’ve taken a bite out of it. Be sure to take out your garbage regularly and clean up any spills inside or on your trash bins.

Once you have a fruit fly infestation, it can take anywhere from a few days to a few weeks to get rid of the nuisance. By taking proactive steps in cleaning and trash disposal, you can save yourself the time and hassle.

Keep reading: The 9 dirtiest spots in your home »