Although some say that you can't, and that once the smell is there, it stays forever, there are many things that you can do to improve the smell of books.
Definitely not all odors are permanent.
It helps if it is summer and of course how musty the smell is - but try placing the book with pages open in direct sunlight, but only for 1 or 2 minutes per open page, keep swapping pages. It takes a while, but often helps.
If you cut a used tumble dryer freshener sheet in half and insert one or two pieces in the pages of the book and leave aside for a week it should help
See the related link for some more ideas.
Wash it.
because it is
it will be musty & moldy
Bad Odor. Smells of sweat.
that someone smells like hell!
Wash them in hot water and put a cup of vinegar in the rinse cycle. If my stuff smells musty or moldy I just hang them in the sun. Some things need to be out there for a few days, the dew wont hurt them, they will be damp in the morning but will dry back up and smell great.
Moldy chocolate appears fuzzy or discolored with green, white, or black spots. You can identify it by its unusual appearance and musty smell. It is important to discard moldy chocolate to avoid potential health risks.
The musty smell that Brian notices when he wakes up is caused by the dampness and mold growth in the shelter. The combination of moisture and lack of ventilation can create a musty odor.
Vinegar
To prevent musty odors in your clothes in the dryer, place a dry towel in with the wet clothes. The towel will help absorb excess moisture, reducing the chances of musty smells developing.
When a house smells musty after being left unoccupied for a period of time, it is often due to the buildup of moisture and mold in the air. Lack of ventilation and sunlight can contribute to this musty smell. Opening windows, using a dehumidifier, and cleaning surfaces can help eliminate the musty odor.
Thistles do not have a pleasant smell. In fact, some people find their odor unpleasant and liken it to that of musty or moldy grass.