To get rid of bees on a hummingbird feeder, it is important to make sure that the feeder isn't leaking as this is the most common reason why bees become attracted to hummingbird feeders. Leaking can happen in hot temperatures because the heat causes the nectar to expand. To prevent this from happening, a bowl-type feeder can be used, instead.
It's also important that the nectar is kept clean and fresh as bees are more likely to be attracted to the old nectar. Hummingbird feeders come with bee guards built in. These guards are made of a membrane that allows hummingbirds to get the nectar, but keep the bees out.
Bees are also attracted to the color yellow. For this reason, it may be advantageous to have the feeder be a different color besides yellow. This isn't the most effective strategy for keeping the bees away, however, as the bees are able to smell the nectar and may locate the feeder, anyway.
There are other strategies, as well. Move the feeder to a new location since bees won't notice this. Taking the feeder down for a few days is another option. Bees also prefer drinking nectar in the sunlight, so try moving the feeder to a shady location.
Some people also try mixing a bowl of nectar especially for the bees. By placing the bowl near the feeder, the bees will be more attracted to the open bowl. Every day move the bowl farther away from the feeder so the bees will be distracted away from it. Be careful of other insects that may become attracted to the bowl. Also, be aware of small children that may find the bowl.