As I've already noted, copyright law gets weedy and complex, fast. I'm not a lawyer and others seem willing to wade into it deeper. More power to them. In short, if one disposes of a commercial CD in such a manner that some else can own it and copy it, then one should also delete any copies of that CD one has made for themselves, IF FOR NO OTHER REASON THAN IT IS FAIR TO THE MUSICIANS et al. The musicians deserve to be paid and make a living rather than being ripped, ahem, off. Likewise, don't be giving away (or selling!) copies. Simple. And if I've managed to guilt-trip someone, good.
Someone suggested giving the original CDs to the library. Fine, do so, but you still have to delete your rips. And it's a good bet that the library will not circulate the donated CDs. If they accept them at all, they'll sell them. Libraries are a whole different world of copyright. E. g. much of the time, libraries have to pay *substantially more* than the retail price of a book for circulation to make up in part the potential loss of sales of that book. Think about it a bit and it makes sense. One of the unfortunate consequences of the internet, and digital technology, is people these days seem to think everything ought to be free. Didn't work that way so much with LPs.