Where do they have 50 tomes for sale?

I keep meaning to go to the big cities but I keep getting distracted by the nearest dungeon !!!

Any of the mages who live in the city castles sell tomes. The higher the level, the more unlock. And yes, it is a hassle to keep track of which ones you have unlocked and which you don't. It probably wouldn't be that hard to make the tomes go "gray" like items in the disenchant menu that you already know the spell of, or reagents on the alchemy menu that you have already tested and found imcompatible.
I have certainly spent gold on spell tomes only to find out that I aready have the spell, and then have to sell them back at a loss... While certainly not game-beaking, it is still an annoyance. I can't care too much though. After all, the ones I have bought in doubles by accident are still advancing my bartering skill...