The rental agreement will survive the sale so if the new owner wants to occupy as his primary residence he (or you) may have to offer a financial incentive to the tenant to encourage him to cancel his lease. If the tenant doesn't want to cancel their lease then you may only be able to sell to an investor. The Seller would have to transfer any deposits held to the new owner.
There may be other legal ramifications so you may want to seek the advice of an attorney.
All the best,