So, I bought a new ereader 'cause it was on sale crazy cheap and I wanted one with a slightly larger screen. (I still like my Sony Pocket Reader -- I think Sony makes the best dedicated ereader in terms of quality of construction and simplicity of design -- but it's nice to have a larger screen with better night-reading features.)
Because I'm a good person and I don't pirate ebooks, and unfortunately most ebooksellers still sell ebooks with DRM, even though I bought and paid for all my books (except the free ones) I can't just transfer them to a new ereader and read them, I have to authorize the reader, and install new software, and oops, there's a new version of Adobe Digital Editions, and also I need to use their proprietary software because Calibre kinda sorta works with DRMed books except it won't actually let you read them or edit the metadata or...
Okay, where's my ADE key located again? And what's my password? And which store did I buy this ebook from, if I need to download it again using my new ereader (since I can't just copy the existing epub file over because that was authorized with my old key)...
Screw that noise. I've had it. I sat down with a hot cup of patience and started Googling.
Stripping DRM from ebooks is not terribly difficult, but it's not completely trivial. Which is to say, there's no one-shot works-for-everyone push-button way to instantly un-DRM all of your perfectly legal, legitimately purchased ebooks. But if you've got a teeny bit of technical aptitude, are willing to download a few scripts, and aren't afraid of the command line, it turns out to be pretty easy.
Because it's going to vary widely depending on your system, the format of your books, where you bought them, and so on, I'm not even going to attempt to instruct anyone on how to do this. If your experience is like mine, you'll follow a tutorial somewhere and then get an inexplicable error message, Google the error message, find another forum that explains what went wrong and what else you have to download, install, or uninstall, and proceed from there.
Here is a good starting point for your journey.
Is it Legal?
Like stripping DRM, there's no simple answer. In the U.S., as far as I can tell, the answer is "Maybe." The RCAA would have you believe "Absolutely not," but it has yet to really be tested in a "fair use" context (such as stripping the DRM from your perfectly legal, legitimately purchased ebooks so you can read them on a new device). In the UK, it appears that it is not legal (though how anyone would catch you at it if you are doing it only for personal use with your perfectly legal, legitimately purchased ebooks, I don't know). The laws of your country, and the zeal with which they may be enforced, vary, so it's up to you to figure that out and decide.
Note that legally and morally, there is a big difference between stripping DRM from your perfectly legal, legitimately purchased ebooks for personal use, and distributing those DRM-stripped books to other people, such as by putting them on a filesharing site or uploading them to a torrent. The former is, IMO, perfectly moral and probably legal (or should be). The latter is called "piracy," and it's a dick move. Seriously, even if you have ideological sympathies with the pro-piracy position (yes, I've read Cory Doctorow too), it's not cool not to pay authors for their work.
But all of my ebooks are now DRM-free, and I will continue to strip the DRM from new ones as soon as I buy them.