Author:
Dr. Muhammad Zia ur Rahman Azmi (may Allah have mercy upon him)
Ruling on Selling Endowed Books if They Become Unusable
If an endowed book becomes impossible to benefit from due to torn or decayed pages, there is no harm in selling it and using the proceeds to purchase a new book in its place.
If the book is still in usable condition and someone replaces it with a better book out of the intention of gaining reward for the original endower, this too is permissible because he has replaced the endowment with something better. However, if someone wants to annul the original endowment to dedicate the reward to himself, then this is impermissible as it constitutes an injustice to others.
[Reference: Ibn Uthaymeen: Noor ‘ala al-Darb: 22/129]