pymel.core.animation.removeJoint

removeJoint(*args, **kwargs)

This command will remove the selected joint or the joint given at the command line from the skeleton. The given (or selected) joint should not be the root joint of the skeleton, and not have skin attached. The command works on the given (or selected) joint. No options or flags are necessary.

Derived from mel command maya.cmds.removeJoint

Example:

import pymel.core as pm

# joint5 will be removed. Child joints of joint5 will be reparented under
# joint5's parent joint.
pm.removeJoint( 'joint5' )