Hmm... my answer is that, much like Johnny Bones' answer, there is a table of Agents. Agents can refer back to themselves, so you could have something like:
ID Agent Refers to
1 Smith Prime NULL
2 Brown NULL
And so on, until you get to the Smith clones:
ID Agent Refers to
1 Smith Prime NULL
2 Brown NULL
3 Smith Clone 1
4 Smith Clone 1
And so on. Now, we can assume that, by deleting "Smith Prime", the other Smiths will become what are known as "orphaned records". In a badly-designed database system these would still be allowed, they just wouldn't work properly. We have to believe that the Matrix is actually well-designed and deleting "Smith Prime" would have a cascading effect, or possibly a trigger, that would delete the clones too.
However, this doesn't answer HOW we are able to delete "Smith Prime". In sql pseudocode, as Johnny Bones pointed out, the Machine God Giant Floating Baby Head Thing could simply have found and deleted his record. We have to believe that Smith Prime is stopping this somehow.
When people are physically jacked in to the Matrix through the Matrix's own systems, their bodies are able to be taken over by the Matrix - or more rather its Agents. We've seen this a few times in the movies - random person becomes Agent. This doesn't seem to be able to happen to the Zion operatives as they're wired in a different way. But when Neo jacks in via the Machine God Giant Floating Baby Head Thing, he's wired in directly through the Matrix's own systems. Even better (or worse, depending on your viewpoint), he has the full attention of the Matrix - both inside the Matrix and in the physical world.
When Smith Prime copies himself onto Neo, he also copies himself onto a mind directly connected to the Matrix - one which the Machine God Giant Floating Baby Head Thing has influence over. Smith Prime is vulnerable in a more frail, human mind, at least temporarily. Neo's body, with Smith Prime inside, can be disconnected and killed in short order.
In short, Neo was bait and Smith was arrogant. Had it been a clone, then it probably wouldn't have worked.