WARNING: This page is about a different car, the 2004 Subaru Forester. However, it is still accessible from the selected car via links, so may be relevant.
Disconnect the ground cable from battery.
Disconnect the ambient sensor connector.
Remove the ambient sensor (A) from radiator lower panel.