Depends on your home's location, I guess. I don't have fruit flies.
Where I am, pantry moths are the problem. One of the few genuinely useful ideas I've ever gotten off NextDoor is this: Dr. Killigan's Premium Pantry Moth Traps with Pheromones.
The pheromones attract the moths, and the glue makes them stick to it and die. You can put it out of site in a cabinet, and after a few weeks it's covered with dead moths.
Where I am, pantry moths are the problem. One of the few genuinely useful ideas I've ever gotten off NextDoor is this: Dr. Killigan's Premium Pantry Moth Traps with Pheromones.
The pheromones attract the moths, and the glue makes them stick to it and die. You can put it out of site in a cabinet, and after a few weeks it's covered with dead moths.