Yes, you can sell your primary residence and move into your second home but the tax you will receive is called Private Residence Relief. You don't pay Capital Gains Tax when you sell your main residence and move home.