Bees have a natural aversion to fire so, when they smell smoke, they may well leave and not come back. So, you could build a smoky fire with dead firewood and cardboard near the beehive, but this comes with risks. Smoke agitates bees and, when agitated, they can become quite aggressive and may sting. So, once you start the fire in a safe spot, protect yourself by keeping a safe distance from the beehive (ensuring you can still watch the fire so it doesn’t become a problem by itself).
You can also put mothballs into socks and hang them strategically. When located close to the beehives, the bees may leave and not come back. That said, mothballs contain naphthalene or paradichlorobenzene, and either of these chemicals can be dangerous to inhale. So, keep children and pets away.
Bees are sensitive to certain smells, they generally don’t like citronella, cinnamon, garlic, eucalyptus, and peppermint, so you could place or plant one or more of those in the general area of the beehive to encourage them to leave.
Additional plants that repel bees include cucumber, marigolds, basil, mint, geraniums, pennyroyal, and pitcher plants. So you can include these flowers, herbs, and vegetables in a garden. A note about wormwood: bees dislike this woody shrub, so you may see recommendations for its inclusion in your garden, but this plant has poisonous properties. So, you may not want this shrub around your children or pets.