What do gnats hate?
Just like most insects, gnats are repulsed by the smell of an array of natural oils produced by plants, like lemongrass, peppermint, vanilla, etc. and they are driven away from dry and cool areas since they can’t breed properly there. The insects will always avoid any scent of alcohol as it’s a death sentence for them should they get in contact with it.