No, I rarely part with a book under any circumstances. Of course, the downside to this is that my apartment looks like that of the book dealer guy from that movie Unfaithful. I've long overflowed all of my shelf space, and now have books stacked up all around the place. I keep meaning to pitch some of the obviously no-longer-useful ones (especially the ones on obsolete, closed-source, proprietary technologies like ASP, ActiveX, etc.) but I have a real strong aversion to throwing books out.
Of course, I'm also continuing to buy more books, so, um...
Maybe someday I'll come to like ebooks just as much, but so far I'm not counting on it.
I've found that e-books occupy a certain niche for me, and they haven't replaced dead-tree books in general. I love my ebook reader when flying (I can carry hundreds or thousands of books on the plane with me! How awesome is that?), and when reading in bed at night (when I'm ready to go to sleep, I just close the cover and close my eyes. No need to fumble around with the lamp, etc.)
That said, most of my ebooks are pirated and are limited to specific niche topics - my collection of ebooks doesn't even begin to rival my physical library in breadth. Maybe eventually, but we'll see...
Doing it all over again today with what's available online, I'd get rid of almost every book after I was done with it. They are so easy to replace that it's not worth the hassle and storage. Think of Amazon / eBay as your book storage mechanism.
It's gone now. I've gotten rid of most of my textbooks, but I still retain a sampling for sentimental reasons.
There are a few treasured texts I keep (Elements of Style, a really good programming book written by a professor) that I kept, but I ditched 95% of them and never missed a beat.
While it's increasingly becoming harder for new students to use old text books due to the habits of publishers releasing new versions yearly and educators go along with it, there is still a lot of value to a new student in a slightly older text.
At the time, I didn't expect to ever want the books again, but after a few years, I wished I had kept some that I got rid of.
Today, I mostly regret not living close enough to an academic library to visit when I want.
Unless you're keeping them for nostalgia/sentimental value.
The books, I could replace on Amazon or eBay if I chose.