Fungus gnats (Sciaridae) are one of the notorious pests in mushrooms plantations. Fungus gnats are generally dealt with using relatively inefficient physical and chemical means, such as sticky traps and pesticides, respectively. Here, we have proposed an integrated pest control system composed of a UV-A LED source at 365 nm, a galvo-mirror pair, and a 445 nm high-power laser diode. We used a 365 nm UV-A LED as the innovative light trap, since fungus gnats’ show maximum attraction to 365 nm, based on previous studies. We also modulated the UV-A LED at various frequencies and the response of the gnats to each of these frequencies were observed. The entire module was controlled using a NVIDIA Nano microcontroller and a DAC card. Our experiments show that the laser module, with the UV-A LED modulated at 40 Hz, could achieve 50% elimination rate in about two minutes, in a test container of 10 × 10 × 10 cm3. Without the light trap, random laser scanning achieved 69% elimination rate in a single scan, taking approximately 4 minutes, indicating the highly improved performance of the UV-A modulated light trap. In conclusion, we have proposed an affordable and easily replicable laser-based pest control system with UV-A light trap modulated at 40 Hz for precisely eliminating fungus gnats in mushroom plantations rapidly.