Personally, I would not use any kind of soap since any left in the tank is deadly for fish. Depends on how dirty it is, I would use diluted bleach and wipe the tank. Pay extra attention to the silicon since it may soaked up something not good for fish like fertrizer. If it is extra dirty or used for long time for other use, you could leave diluted bleach water in it for a while. If it become smell bleachy, you can always splash or wipe with little vinegar which should nueturaize the bleach. Or you can wash with extra de-cholorined(water conditioner) water. And I would wash with old water from the other tank if you have one and when you do the water change. And probably better if you take your time to air dry the tank. That should make any tank smell like other tank and should be ready for new fish home.
And it is also always good idea to check the leak before you put the fish when you aquire the used tank. I usually fill it up over the newspaper for over night or 1 day. Just place the tank somewhere leveled and ok to get wet(hopefully not). Like back yard, garage, balcony or bath tub. If the newspaper under the tank is wet, you know it is leaking. So you either need to get another tank or look up the DIY thread and fix it. Good luck.