Many assume that in a lease to own housing transaction it is a simple matter to regain possession if the potential buyer fails to close and/or fails to pay rent. Not so fast.
A landlord may bring either an unlawful detainer action or ejectment action to evict a tenant. 
It is far preferable for the owner to bring an unlawful detainer action. An unlawful detainer action is an expedited form of litigation narrowly tailored to the issue of possession.  Counterclaims are only proper if they relate to the issue of the right of possession. 
However, unlawful detainer actions can only be brought in situations that fall under the statute. 
A buyer who is in possession of real property – as opposed to a tenant in a landlord-tenant relationship – cannot be evicted in the expedited unlawful detainer action.  Rather, to evict a buyer in possession the owner must bring an ejectment action. 
In an ejectment action the defendant is served a summons answerable in twenty days, rather than only seven in the unlawful detainer action. The ejectment action is a general civil lawsuit, not a special proceeding with a show cause hearing on shortened notice. As a general civil action, counterclaims are not limited to the issue of possession. The ejectment action will generally take longer, cost more, and may have a more uncertain outcome. The ejectment action should be avoided by an owner if possible.
Some possible ways to avoid the ejectment action.
Do not give an option to purchase that can be exercised right away. Grant an option that may be exercised only at the end of a lease period. If the tenant is not reliable with rent the owner may evict via unlawful detainer and avoid ejectment.
Require both written notice and additional consideration to exercise the option.
The terms of the lease should stipulate that a default of the lease voids the option.
Forbid improvements to the property during the term of the lease. Enforce this lease provision with ten day notices to comply or vacate when appropriate.
When faced with evicting occupants, the owner should whenever possible avoid ejectment and proceed with an unlawful detainer action.