Please contribute generously in order to ensure the continuity of our website InshaAllah.
Praise be to Allah.
Firstly:
We praise Allaah for having enabled you to repent and having guided you to the straight path. We ask Allaah to guide you and us, and make us more steadfast.
Secondly:
What you have mentioned about it not being permissible to give to others that which will help them to do haraam things is correct.
Based on this, what you have to do is erase the music that is on these CDs, then make use of them by copying useful things onto them, or giving them to a charity to copy useful things onto them.
If you cannot copy anything onto them, then you have no choice but to destroy them. It is not permissible to give them to someone who will listen to them, whether that is by selling them or giving them, to a person or to a store, because that is helping in sin and transgression.
See also question no. 13754.
And Allaah knows best.