To avoid paying capital gains tax on rental property you want to sell, consider moving into the property and making it your principle residence before selling it.
Gain on the sale of your principal residence can be excluded from taxable income if you have lived in the home for two out of the past five years.
If you sell your personal residence, you may be able to exclude from income any gain up to a limit of $250,000 ($500,000 on a joint return in most cases). The exclusion can only be used once every two years. New tax laws limit the amount you can deduct, so you should check with a tax advisor.