How do tou take apart maglites?

For the 2D, it is as rufusbduck and dbcustom say - only thing i can add is, if you don’t have torx, you can also carefully do with 5/64 hex key. you have to poke slowly with the wrench till you find the screw groove. then slowly and deliberately rotate counter clockwise to unloosen.

for the AA mini led, you can search youtube for how to take apart maglite mini - basically after unscrewing the head, push the led block from the top using a dampening layer like an elastic exercise band so as not to crush the led. push hard till the entire led assembly drops down into the battery compartment. i was just successfully doing it this morning. it will feel like you are not doing it right till it finally happens - and then you realize you are in maglite heaven.