What's the most economical way to remove a wood stove?
The pipe is likely held together with sheet metal screws. You don't want to leak heat from your interior to the attic, so that section of pipe should be removed, preferably from above.

The section from attic to above to roof might be useful as a vent, if it is in good shape and not leaking.