All perfect praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upon all of his family and companions.
Honoring verses of Quran, Holy Hadiths and Attributes of Allah is an obligation and degrading them is impermissible, since Allah, The Exalted Says (What means): "And whosoever magnifieth the offerings consecrated to Allah, it surely is from devotion of the hearts." [Al-Hajj/32].
As for useful books of Knowledge; especially the ones containing verses of Quran, Holy Hadiths or The Attributes of Allah, handling them with respect away from any degraded/disrespectful manner is an obligation. Therefore, throwing them into trash, where people usually walk, at filthy places or tearing into pieces with no reason is impermissible. Besides, whosoever did any of the above actions while he knows the ruling has committed a great sin. Moreover, the person who did any of which out of mocking deliberately, is to be risking his religion as this is considered an act of disbelieve. In this regard, Allah The Exalted Says (What means): "Was it at God, and His Signs, and His Apostle, that ye were mocking?" [At-Tawbeh/65].
In addition Al-Imam Shams Al-Deen Al-Ramli (May Allah Have Mercy on his soul) stated: "An intentional mockery of Islam, an objection to it or out of disbelieving such as throwing The Holy Quran or any books or papers (containing verses, an attribute of Allah or a Hadith) for the reason of degrading it is considered an action that will deem its doer into a disbeliever." [Nihayat Al-Muhtaj Alaa' Sharih Al-Minhaj vol.7/pp.416].
In conclusion, the manner of getting rid of similar books is either by distributing them to poor students, burning then burying or taking them to places allocated for recycling to avoid any possible degradation. And Allah Knows Best.