To keep hoverflies away, you can plant certain herbs and flowers that repel them, such as marigolds, lavender, or mint. These plants emit scents that hoverflies dislike, making them less likely to hover around your outdoor spaces. Regularly maintaining your garden and removing any decaying plants can also help discourage hoverflies.