Not long. More than one federal court has ruled it is a violation for local authorities to keep someone - even an illegal immigrant - detained in jail after they are otherwise free to go/the reason for their detention was resolved.
Why would an “illegal alien” be free to go anywhere except back where he came from???
Illegal is illegal, no matter how you say it....