On the one hand, you don’t want children to be easily influenced to adopt behavior that should not be adopted.
However, there are still books out there that do have racist overtones. This is something you just can’t remove from every day life.
I think a better solution would be to continue publishing these books, but prevent children from reading them until they are old enough to understand why the race portrayals in these books are wrong.
Or, at the very least, hold an open discussion about these books.
Banning / removing them entirely isn’t the answer in the long term.