Investors & landlords

Is the gain avoided if you eventually make the exchanged property your primary residence?