Unless you remove the swingarm, the u-joint will remain in place and the shaft will just pull out. When reinstalling be sure everything is buttoned up BEFORE fully tightening the 4 bolts of the final drive. Having everything (wheel, shocks, etc.) tightened FIRST is what gets the drive shaft lined up properly before tightening it fully.
I agree those 4 bolts holding the pumpkin on are tightend last, however what wasnt said and is very important is that the axle be the FIRST thing tightend (well you have to stick the caliper plate holder pin through the swingarm but that doesnt affect the process). THEN TIGHTEN that axle to 81ftlbs while the pumkin is loose and free, that is the secret to proper alignment. Dont put the shocks on first, dont snug up the 4 pumkin bolts....... pumpkin needs to be loose and free and then torque the axle, then it really doesnt matter what you do next next and last