Solution(primary towards bottom): I've tried almost everything, once I thought they were almost gone, they come right back. It's a few different species of gnats and flies I'm dealing with. Majority stay on ceiling and walls and edges of things. They leave a hell of a mess to clean up after a while where they "rest". I'm getting ready to repaint my ceilings.
This is a collection of things to do at the same time:
I started with a large indoor bug zapper, it still works, but barely. They all have seem to evolved after generations to avoid it.
If you get pads or strips, they have to be sticky like honey, not tape, only gets really tiny ones if not honey like.
The "tricks" of poking holes in clear wrap and using some fruit and/or solution does not work. I've tried vinegar, bleach, lemons, left over food; different combinations. Now the only purpose the "method" serves, is catching 1% of the total population, so this method stopped working long ago.
Be ANAL about keeping all food and cans covered, thrown away, washed out, at least in the kitchen when done. Trashcan, unless its an air tight lid, put it on the landing or garage. Keep sink clean, nothing even residue on the steel. You pour something out in sink, SPRAY IT CLEAN RIGHT AFTER.
I've tried solution spray bottle, but maybe the mixture was off. Didn't work. I've also tried wiping areas with solutions, also didn't work.
What they apparently love, is cat food in cans that you open. Second to that is lemons, could maybe trap them some how, haven't tried. But canned cat food is miles more attractive to them.
Make sure your fridge seals are air tight, press extra hard when closing.
If they are in the trash as a go to, quickly trap/wrap, move to garage, repeat in an hour.
BEST SOLUTION: LIGHT! They all for the most part are attracted to light (WHEN AGITATED). I do this mostly at night. I basically use a broom or a large object. I sway or shake it a few far right, then left (kept vertical). When they try to go one way, I switch sides. I use what is like a half circle or cone(imagine holding the bottom of a bowl to your chest), cornering them into the direction I want. Sometimes I rock it back and forth about 15-30°. Sometimes I also just instead micro shake the broom, or both at the same time. I go from the furthest room from garage, sealing off the other rooms they can go into. The furthest room is dark, start from the back, and have the hallway light on with doors closed except the room i'm getting them out of, and I do this with all rooms only with 1 door open at a time to push them into the hallway. Rinse and repeat. Larger rooms are much harder to control them. I can get drenched in sweat within an hour; i'm not unfit. Wise to have at least 2 or more people. Once I get them to the kitchen (sealing it off with sliding door), I work from the back of the kitchen with the lights off. Make sure once sway with broom on walls and cabinets, you also get under upper cabinets over counters. I have a landing between my kitchen and garage. So the light in the landing is on with door open between kitchen and landing. Be sure to swipe quick behind doors you want them to go through, they hide quick in the back. You can try cutting some clear tarp and hanging it taped over lapping doors you open/close repeatedly. Maybe a bit of cardboard at the top between the wall and the door, taped to the door, and clear tarp(cut), hanging off of that, so when you open the door, you can have a way to prevent them going behind the door. You have to work fast if you want the most in one lap. Once I get a hundred +/- into the landing area. I carefully keep cornering them into the landing, then immediately shut the door. Then I turn the light on the landing off, open the door to the garage where I have a bright light that is PLACED LOW, about 3 feet from the door inside the garage to the house, and a bit angled so they can see it better in the direction I want them to go. Rinse, and repeat. THIS TAKES TON OF WORK AND PRACTICE TO GET IT RIGHT, kind of becomes and art (order out of chaos).
You can try using painting tarp that you get in large rolls or a sheet to close off rooms/entrances that don't have doors. Duct tape doesn't stick for long with bed sheets though, for long term stay, tacks or nails. I have plaster walls(thicker), so screws or nails not tacks I would have to use. I also have a large cardboard box that's about the same size of the door ways.
This started I think when my basement flooded a while back. They could be in the drain, but I don't think so. The small elongated flies are on the ceilings(mainly), walls(higher up more so), cabinets(like walls) and edges of things (higher up always), the gnats are (when they get the opportunity), in bags, cans, sink. They like to lay brown cocoons on plates and stuff in the sink. The gnats, most of them have stripes in the back.
For clean up of walls, cabinets, edges of things(few options): I have variable speed drills. USE LOW SPEED, it will fling everywhere if not. I also have lots of different types of Velcro pads and brush heads of different hardness, good for cleaning toilets and showers 10-50x faster. I have a right angle drill adapter to make higher up on walls easier. Spray water bottle and folded mild wet paper towel. You will go through A LOT if you don't use gloves and rinse unfolded in sink with sprayer (warm water). If you wring it too hard, you will get less uses before tearing more off the roll. You can use micro-fabric pads, like Mr. Clean Magic Eraser, but don't use on wood with clear coat/shine, it will remove the finish after 2nd+ pass. Don't use anything but water in spray bottle. Vinegar mixture maybe on walls, but wipe off quick. As I mistakenly forgot was in the spray bottle; removed the finish/coating on wood, long drips are worse. Unless refinished, it's permanent streaks.
Or call pest control. I can manage them, but I can't fully get rid of them.