Bug Zappers that you plug in and hang up near your patio, porch or even inside the house can and do work to kill off some bugs that are attracted to the light.
The bugs will be attracted to the light from the bug zapper and when they fly towards the light they'll be zapped and killed.
Be aware though that the Bug Zapper can cause more bugs to be attracted to your yard but if they enter the bug zapper they'll be killed.
You can also use the Bug Zapper indoors as well to kill flying insects inside your house.