Preventative measures that may be taken to keep bees from a yard consist of making sure garbage cans are sealed, eliminating standing pools of water, and planting marigolds, red dianthus or geraniums around the yard. Natural bee repellent can be made by combining banana peels, sugar, vinegar and water in a 2-liter bottle or by cramming mothballs into old pantyhose.
Bees normally search for sugars or carbohydrates to bring back to their hives. Sealing garbage cans deters bees from entering a garden.
To make a natural bee repellent, cut small strips of a banana peel, and insert them into a 2-liter plastic bottle. Add a cup of sugar and a cup of vinegar, and fill the rest of the bottle with water. Leave 2 inches of room at the top. Hang the bottle at the perimeter of the yard using a piece of twine.
Another option is to take a pair of old pantyhose, and tie the legs closed. Stuff the stockings with mothballs, and hang them up around the yard. The odor of the mothballs keeps bees away. Bees also do not like the pungent smell of marigolds, red dianthus or geraniums, so planting them around the perimeter of a yard repels the insects.