Hornets hate the smell of peppermint oil. Keep hornets away by putting peppermint oil-soaked cotton balls where you notice hornets, or spray the areas with a spray bottle full of peppermint oil and water. You can also grow mint around your garden as a passive deterrent.