Unsurprisingly, yes. You have to delete the book after you sell it. Relevant quote:
"Resale: If you buy an O'Reilly ebook, when you are done with it you may resell it, provided that you do not retain any copies of the book after you sell it. This is the same as the situation when you sell a used print copy—when you sell the copy, you deliver it to the buyer and no longer have a copy in your library. If you have bought a hard copy/ebook bundle, you may of course retain the hard copy, if you sell the ebook."
- Under more about usage.
Still an awesome policy.