Switch the power off at the circuit breaker, disconnect the line, neutral, and ground wires from the old wiring device (if applicable), and cap each wire. To identify the line wire (the wire that is energized), turn the power back on, and use a voltage detector. Remember to switch the power off again at the circuit breaker before proceeding.