Companion planting and putting certain flora together is another effective way of avoiding issues. Certain combinations are classic: Onions and carrots make great companions as each repels the insects that like the other. There also classic repellant plants such as mints, citronella, lemongrass, basil, lavender, marigolds, and nasturtiums, which all provide useful crops as well as deter unwanted bugs. Then, there are plants like dill and parsley, members of the mustard clan, and medicinal flowers that attract beneficial insects.