Stomoxys calcitrans causes losses to livestock, mainly to cattle. This study aimed to determine the pathogenic potential of Heterorhabditis bacteriophora HP88 and H. baujardi LPP7 against S. calcitrans larvae after being exposed to byproducts of the sugar and alcohol industry. The efficacy of EPNs on stable fly larvae was evaluated in bioassays with vinasse at three temperatures (16, 25 and 35 °C) and concentrations (0, 50 and 100%), as well as in relation to larva age (4, 6 and 8 days) in filter cake and EPNs concentration (100, 300 and 500 IJs/larva) in sugarcane bagasse. H. bacteriophora showed higher efficacy than H. baujardi at all temperatures. Vinasse did not have a negative effect on the virulence of H. bacteriophora. The age of fly larvae did not affect the mortality rates caused by the EPNs. In bagasse, H. bacteriophora presented higher mortality rates than the control group. It is concluded that EPNs can be a potential component in integrated strategies of stable fly control and outbreak prevention in areas of sugar and alcohol production.