All these little gnats look for is some organic stuff that's turning bad so they can lay their eggs in it.
As a pest control technician I once opened the refrigerator door in a hospital break room, and found a thriving colony of fruit flies inside.
That really surprised me at the time because I always thought fruit flies were more a warm weather pest.
I didn't expect to find them inside a cold refrigerator.
I sure learned something new that day.
The discovery started with my seeing fruit flies flying around the area where the refrigerator sat.
Most of the time when I found these gnats I also found a trashcan sitting close.
This happens often in hospital break rooms when the trashcans go un-emptied for days sometimes, and food starts rotting in them.
That gives fruit flies a perfect breeding ground.
They lay their eggs in the rotting food, and hatch out a whole bunch of babies.
Doesn't take long before a big cloud of fruit flies surround you every time you toss something new into the trashcan.
But this time the trashcan was on the other side of the room, so I searched around the fridge looking for the material that the gnats were using for hatching out their eggs.
I even moved that refrigerator away from the wall to search behind, and underneath, with no luck.
Finally I opened the door and there they were, laying their eggs under the crisper drawer at the bottom.
I pulled the drawer out, and found a spill of some liquid or other that somebody didn't clean up.
Fortunately the spill was only a few days old.
I knew that because it still attracted only fruit flies.
When organic material passes from the rotting stage to the putrefying stage it draws in the phorid flies.
(By the way, that word "phorid" rhymes with horrid.
How does that sound to you?) Cleaning the spill away got rid of the problem.
I admit that you won't see many fruit flies after the weather turns cold.
Fact is you most likely won't see any in your home during winter unless somebody drops a bit of food, and it bounces under (or behind) something and goes unnoticed.
Once that food starts rotting the gnats find it.
When their eggs start hatching out you'll have them flying around your head.
A cloud of fruit flies buzzing around you is your first hint that something rotten lies nearby.
The most effective pest control technique for treating a fruit fly problem is housekeeping.
Once you clean the rotting stuff up the gnats start leaving, or dying off.
When that cloud of gnats gets huge you'll want to apply a spray treatment to help get them under control.
Once you perform proper pest control techniques fruit flies usually disappear in three to four days.