@jonahua 1031 allows you to roll your capital gains (ie depreciation) into a different building and defer paying the tax due. There are investment firms with specific funds that allow you to buy into another building, similar to a reit. They manage the property and pay you dividends.