Suppose I buy an apartment which has a rent controlled or rent stabilized tenant but I want to use the apartment as a primary residence in NYC. Do I have the right to evict the tenant and move in?
You cannot evict them immediately. You can, however, decline to renew their lease when it expires if you give proper notice. From this information sheet:
In NYC, an owner may refuse to renew a rent stabilized tenant’s lease because the owner has an immediate and compelling need to possess the apartment for use as his or her primary residence or as a primary residence for his or her immediate family. Under the Rent Stabilization Law, an owner may begin an eviction proceeding when the current lease expires, but only after the tenant is given written notice that the lease will not be renewed. This notice must be served at least 90 and not more than 150 days before the current lease term expires.
In addition, if the tenant is elderly, is disabled, or has lived in the apartment for more than 15 years, you must provide an equivalent (or superior) apartment to them at the same (or lower) rent in a nearby area. This may be difficult if you only own one unit in a larger building, rather than an entire building.
Finally, due to the ongoing COVID situation, the COVID-19 Emergency Eviction and Foreclosure Prevention Act (CEEFPA) allows tenants to submit a hardship declaration to avoid eviction. Such a hardship declaration can be filed if the tenant has experienced financial hardship due to COVID-19 or if moving would present a health risk to the tenant or a member of their family. Note that the above link is out of date; the moratorium was recently extended to January 15, 2022.