Read the fucking manual!
Oh, you want a quick answer.
Pop the retaining pin out of the front sight base, twist the gas tube back into the upper reciever, then pull forward when it clears the delta rings.
You have to remove the handguards, bolt, carrier and it's a good idea to demate the upper from the lower.