Well in the USA, there is the 1031 exchange which lets you defer capital gains when you buy/sell primary home and finally at death you can use the step-up basis rule to avoid paying the deferred capital gains completely when your heirs inherit it as well.