Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
If you downloaded from reputable sites, then there is no need to worry; they may have the permission from the authors to put them out as a sadaqah jariyah. It is also possible the authors may have initially published that these works as a waqf for the community. So, you may use them for personal study or research. At no time, you are allowed to sell such materials.
If, however, you are certain that some of these books were put out by people without the permission of the copyright holders, then you need to delete them from your library.
If, however, you have been guilty of this in the past, you can seek expiation through istighfaar and giving extra charities.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.