Found this on the internet: I used some Vinegar in a ziploc bag with 2-3 holes hopefully I can capture that pesky Gnat.
Gnats are annoying, flying household pests no one enjoys. The word gnat normally covers varieties of fruit flies and vinegar flies. Gnats are attracted to moisture and rotten food. Their tendency to infest kitchens makes killing them with hazardous chemicals a last choice. However, it is possible to use vinegar to safely get rid of gnats.
Whatever method used to get rid of gnats, it is essential to prevent them from infesting again. Gnats multiply quickly, and they will return to any setting that they find hospitable. It is essential to keep the environment dry and clear of trash. Store fresh fruit in the refrigerator, and throw it away when they are overripe.
Vinegar can be used to get rid of gnats in the form of a vinegar trap. Vinegar traps are easy to make and can be used throughout the home, although they work best near areas where gnats feed and breed. To make a vinegar trap, simple take a bottle or jar with a large opening and fill it with vinegar (preferably white vinegar). Cover the trap, and cut a few small holes into the lid. The vinegar traps will attract the gnats. They are able to crawl into the trap but not make their way back out.
Another method for using vinegar to get rid of gnats is an alternative vinegar trap. This homemade insect trap is simple. Take a bowel and mix a few drops of dishwashing detergent with some vinegar. The vinegar will attract the gnats, and the detergent will help trap them in the bowel.
Placement of the vinegar traps is important. Place the traps where the gnats are known to congregate because, if the traps are in other areas of the house, they will be attracted to the vinegar and move throughout the home. Keep an eye on the traps and move them as needed to locations with dense gnat populations to get rid of the pests.