You would end the illegal immigration problem overnight by locking up the CEOs of the corporations that hire them, or hire the contractors that employ them. But the goal shouldn't be to kick them out of the country as they perform a necessary function in the economy. I used to work with a guy who had an interesting take - he said "I don't care why you're here but at least sign the guestbook." In other words, we can have the same people coming in, but they would be here legally and we would know who they are.
We already have the tools to do this. Here in Georgia, over the past decade there has been a huge jump in H-2A agriculture labor visas, to the point that we're third in the nation, right after California and Florida, even though those states are much larger. At the same time there has been a corresponding drop in illegal workers in that industry. They're still there but farmers and labor contractors don't use them nearly as much.
There's also the H-2B program for non-agricultural unskilled labor. Most of these work in restaurants and hotels. Unlike H-2A which has no limit, there is an annual cap on H-2B. It's also a much more complex law that is nearly impossible for employers to follow without making a mistake. If we lifted the cap and streamlined the law, more people would use it.