You have to depreciation recapture any depreciation you deduct from the apartment in prior years. Depreciation recapture refers to the amount of gain from the disposition of property that must be reported as ordinary income. The portion of the gain that is not considered depreciation recapture is treated as a capital gain.
Example: The apartment cost $100,000, you depreciated $5,000 per year for 5 years total $25,000 depreciation. You sale the apartment for $125,000. $25,000 of the $125,000 will be tax as ordinary income and $100,000 will be tax as long term capital gain.
Any gain minus depreciation recapture will be taxes at long term capital gain at the rate of 15%.