Removing X Axis or Y Axis stepper motors

I am replacing the stepper motors to upgrade from 1F pro to Elite. Removing the motor seems straight forward except for the wiring. How do I disconnect the wiring? X & Y rails