Specificity of sensory neurons requires restricted expression of one sensory receptor gene and the exclusion of all others within a given cell. In the Drosophila retina, functional identity of photoreceptors depends on light-sensitive Rhodopsins (Rhs). The much simpler larval eye (Bolwig organ) is composed of about 12 photoreceptors, eight of which are green-sensitive (Rh6) and four blue-sensitive (Rh5). The larval eye becomes the adult extraretinal 'eyelet' composed of four green-sensitive (Rh6) photoreceptors. Here we show that, during metamorphosis, all Rh6 photoreceptors die, whereas the Rh5 photoreceptors switch fate by turning off Rh5 and then turning on Rh6 expression. This switch occurs without apparent changes in the programme of transcription factors that specify larval photoreceptor subtypes. We also show that the transcription factor Senseless (Sens) mediates the very different cellular behaviours of Rh5 and Rh6 photoreceptors. Sens is restricted to Rh5 photoreceptors and must be excluded from Rh6 photoreceptors to allow them to die at metamorphosis. Finally, we show that Ecdysone receptor (EcR) functions autonomously both for the death of larval Rh6 photoreceptors and for the sensory switch of Rh5 photoreceptors to express Rh6. This fate switch of functioning, terminally differentiated neurons provides a novel, unexpected example of hard-wired sensory plasticity.