Some air fresheners may help repel flies, but it won’t kill them. In the past, formaldehyde in air fresheners was suggested as a pest solution, but the chemical is no longer used in today’s air fresheners.