Chemoperception plays a key role in adaptation and speciation in animals, and the senses of olfaction and gustation are mediated by gene families which show large variation in repertoire size among species. In Drosophila, there are around 60 loci of each type and it is thought that ecological specialization influences repertoire size, with increased pseudogenization of loci. Here, we analyse the size of the gustatory and olfactory repertoires among the genomes of 12 species of Drosophila. We find that repertoire size varies substantially and the loci are evolving by duplication and pseudogenization, with striking examples of lineage-specific duplication. Selection analyses imply that the majority of loci are subject to purifying selection, but this is less strong in gustatory loci and in loci prone to duplication. In contrast to some other studies, we find that few loci show statistically significant evidence of positive selection. Overall genome size is strongly correlated with the proportion of duplicated chemoreceptor loci, but genome size, specialization and endemism may be interrelated in their influence on repertoire size.