I am planning to buy the source code of business that is currently making revenue. How can I be sure that the seller does not have a copy of the source code that they can use later?
You cannot. You would need to check every computer that may contain a copy of the code. In other words, you would need to check the entire Internet. (Well, maybe something like that will be possible with quantum computing, I am not an expert in that.)
The only thing you can is to make a legal agreement with them. The agreement (if they would be very favorable to them) could contain their permission for you to spy on them to check it. If you know they violated, you could sue them.
I am not a lawyer.