Summer is way better without gnats - so everyone should know how to get rid of them.
While you can find special chemicals to kill the insects, you can also try some more natural ways to kill gnats.
Here are some tips on how to prevent or kill the annoying insects.
Remove excessive moist and decay
Gnats are attracted to moist and decaying things. Identify and get rid of potential breeding grounds such as overwatered plants, standing water, and damp cloth. Make sure to get rid of all excessive moisture.
Set up fruit or vinegar traps
Cut a piece of ripe fruit, such as banana or melon, and place it in a container. Cover it with plastic wrap and poke small holes in it. Insects will be lured by the scent of the "treat" and get inside through the little holes. You can use the same method to attract insects with vinegar: gnats love the smell, so they will get inside the trap without an opportunity to get out.
Pour some boiling water down your sink
Gnats often live in kitchen tubes under the sink, so you can drain them with boiling hot water. Do that once a week in summer to prevent new gnats from settling down there.
Use natural repellents
Certain scents repel gnats. You can try using natural repellents such as essential oils. Peppermint, eucalyptus, and lemongrass are known to deter gnats. Mix a few drops of these essential oils with water in a spray bottle and mist the areas where gnats are present.