In the beginning I worried about this, but in the end, there are two reasons why I stopped caring:
1. I keep the book updated and relevant, so those versions of the book are basically historic artifacts and become more and more worthless over time. This value helps people who actually care about the knowledge in the book to decide to buy from LeanPub or Amazon, eventually.
2. Most of the people who put up with getting popup ads and malware on their computers just to download my book aren't likely to pay for it anyways.
I have only filed one or two takedown notices, to people who posted YouTube videos infringing on the content of some of my talks and past videos, and once to a more popular / non-malicious site that was sharing a PDF.