The way I’ve done mine is to bore them out on the lathe, or, using a hacksaw blade in a single holder, cut a groove in the inner pipe inside the outer part and carefully tap a thin screwdriver between the outer and inner piece to collapse the inner. I do need to warn you that the end where the bowden cable attaches, often will split when you press the outer pipe back in. The twist grip end is more forgiving.
May I ask why you want to do this? Are there dents in the outer pipe? They can be removed without having to remove the ends.
I have shortened some of my long handles.
George