Recaptured depreciation of former rental home (from rental home to principal residence)

Say I have a rental house that I've depreciated.  I understand rental depreciation recapture.  But I don't understand whether this rental depreciation recapture goes away after you make the rental home into your principal residence (and live there for at least 2 years out of five to take advantage of the homeowner's exclusion tax break) and then decide to sell it.

 

Can you avoid paying tax on the recaptured depreciation?  My instinct says no, you cannot avoid this tax, just by living in a formerly rented home, as your present principal residence, and then selling that home.  Otherwise people would do this all the time and this loophole would be well known.  But I rather hear it from somebody here.

 

Thank you.

 

 

Other posts researched:

 

https://ttlc.intuit.com/community/investments-and-rental-properties/discussion/selling-a-rental-depr...

Recaptured depreciation is tax as ordinary income on this year's (the year the depreciation is re-captured) return, at whatever tax bracket you are in for that same year.