WARNING: This page is about a different car, the 2004 Nissan Maxima. However, it is still accessible from the selected car via links, so may be relevant.
Loosen the fixing bolt of the sensor.
Disconnect camshaft position sensor (PHASE) harness connector.