When removing a voltage source, its voltage must be set to zero, which is equivalent to replacing the voltage source with a short circuit. When removing a current source, its current must be set to zero, which is equivalent to replacing the current source with an open circuit.