Anti-corruption initiatives often fail to change the underlying incentives faced by politicians. Using data from judicial records, I assess whether the removal of corrupt mayors from office by the judiciary causes the deterrence of corruption in other municipalities in Brazil. I argue that politicians and other actors who engage in illicit activities are uncertain about how much authorities are capable of investigating corrupt practices and willing to enforce the law. By transmitting information about the experiences of other politicians, the local media can change the incentives of those deciding to engage in corruption. My statistical results indicate that mayors in the same local television market as a mayor who has been removed from office are significantly less likely to be found guilty of corruption. I also demonstrate that this deterrence effect is conditional on the ownership structure of local media: it does not hold for municipalities in which the main television channel is owned by an active politician.