Analysis of the pattern of nucleotide diversity in 222 independent viral sequence datasets showed the prevalence of purifying selection. In spite of the higher mutation rate of RNA viruses, our analyses revealed stronger evidence of the action of purifying selection in RNA viruses than in DNA viruses. The ratio of nonsynonymous to synonymous nucleotide diversity was significantly lower in RNA viruses than in DNA viruses, indicating that nonsynonymous mutations have been removed at a greater rate (relative to the mutation rate) in the former than in the latter. Moreover, statistics that measure the occurrence of rare polymorphisms revealed significantly a greater excess of rare nonsynonymous polymorphisms in RNA viruses than in DNA viruses but no difference with respect to synonymous polymorphisms. Since rare nonsynonymous polymorphisms are likely to be undergoing the effects of purifying selection acting to eliminate them, this result implies a stronger signature of ongoing purifying selection in RNA viruses than in DNA viruses. Across datasets from both DNA viruses and RNA viruses, we found a negatively allometric relationship between nonsynonymous and synonymous nucleotide diversity; in other words, nonsynonymous nucleotide diversity increased with synonymous nucleotide diversity at a less than linear rate. These findings are most easily explained by the occurrence of slightly deleterious mutations. The fact that the negative allometry was more pronounced in RNA viruses than in DNA viruses provided additional evidence that purifying selection is more effective in the former than in the latter.