It is quite simple:
1. You have textured a part of your board with texture A.
2. You don't like it any longer, so you cover it with Texture B.
3. Thats it. Trainz will delete the unused kuid's of the covered texture(s) in the map.
You have to do nothing else, nothing in the config and nothing in the gnd-file, no removing - forget all that internal manipulation. Trainz is intelligent enough to do that for you.
Indeed: When you covered a texture with another texture there is nothing under it!
(- ok, from the description above you know that textures only are deleted in the stored map data, when
1. covering a texture totally and
2. after saving it a second time).