The veterinary pharmaceutical ivermectin is commonly used against parasites of livestock. Excreted in dung it can have lethal and sublethal effects on non-target organisms developing in and living around cattle dung. Research in this realm typically investigates the impact of pharmaceuticals on dung-feeding insects by looking at juvenile development and survival, while fitness effects of adult exposure are largely neglected. We conducted laboratory experiments to assess combined effects of ivermectin on life history and reproductive traits of juvenile and adult yellow dung flies (Scathophaga stercoraria). Two treatments (12 and 24 μg ivermectin/kg wet dung) were used for the larvae reared in dung, and one much higher concentration (3000 μg ivermectin/kg sugar) for the adult flies (in addition to uncontaminated controls). Juvenile ivermectin exposure lead to smaller body size of male and female flies. Adult feeding on ivermectin-contaminated dung additionally resulted in adult male flies with smaller testes (and likely fewer sperm) that experienced reduced mating durations, resulting in lower probability of producing offspring. Exposure of adult flies to ivermectin lowered offspring production and survival for both sexes. Thus, treatment of livestock with pharmaceuticals such as ivermectin appears to have even more far-reaching sublethal ecological consequences than previously assumed by affecting not only flies at their larval stage but also adult mating behaviour and reproduction.