To remove a junction box from a gas oven, loosen the wire nuts by turning counterclockwise. Untwist the wires inside the junction box. Loosen the coupling on top of the junction box where the cable connects. Pull the armored cable out of the top of the box and allow it to hang freely. Turn off the gas supply for the oven, in gas appliances.