The motor has a splined shaft securing the gear. I have removed the brushplate, staddled the armature in a vise supported by field windings, then used a drift smaller than the shaft to drive the armature out.
Why do you think you need to replace the armature bearings? The idler gear generally wears out before the motor bearings. Just pry the idler out with a small screwdriver. Replacements are available from ttender.com.