A seasonal study of the lipid composition of a primary sludge (dry and dewatered base) obtained from an urban wastewater treatment plant located in Aguascalientes (Mexico) is reported. This study assessed the variability in sludge composition to establish its potential as a raw material for biodiesel production. Lipid recovery was achieved by extraction using two solvents. Hexane was employed for lipid extraction from dry sludge, whereas hexane and ethyl butyrate were used for comparison with dewatered sludge. The formation (%) of fatty acid methyl esters (biodiesel) was determined using extracted lipids. The extraction results from the dry sludge showed 14 and 6% of recovered lipids and their conversion to biodiesel, respectively. For the dewatered sludge, the lipid recovery and biodiesel formation were 17.4 and 60% using hexane, and 23 and 77% for ethyl butyrate, respectively, on a dry basis. Statistical data indicated that lipid recovery depended on the physicochemical characteristics of sewage sludge, which were related to seasonal changes, population activities, and changes in plant configuration, among other factors. These variables must be considered in the design of large-scale extraction equipment for the application and commercial exploitation of biomass waste in biofuel production.