Gnats and fruit flies are very similar and love the same sources of food. This is why they can easily be attracted and eliminated with vinegar traps.
But, if you want to get rid of many different insects at the same time and ensure your home is completely bug-free there are some solutions such as sticky traps and window glue traps that are far more efficient and long-lasting.
Simply place a few sticky traps in the pots with your plants and see the results in a couple of days. Your traps will be full of unwanted pests and your home will be clean and free of harsh chemicals and strong odors that DIY traps leave.