The old rule about reinvesting the profit from the sale of your primary home, into a new home, expired about 20 years ago.
The current rule is that you may exclude the capital gain on the sale of your home, up to $250,000 ($500,000 married), regardless of how you use the money. To qualify you must of owned and lived in your home for at least two of the five years prior to the sale.