BackgroundThe reliability of culture-independent pathogen detection in foods using metagenomics is contingent on the quality and composition of the reference database. The inclusion of microbial sequences from a diverse representation of taxonomies in universal reference databases is recommended to maximize classification precision for pathogen detection. However, these sizable databases have high memory requirements that may be out of reach for some users. In this study, we aimed to assess the performance of a foodborne pathogen (FBP)-specific reference database (taxon-specific) relative to a universal reference database (taxon-agnostic). We tested our FBP-specific reference database's performance for detectingListeria monocytogenesin two complex food matrices—ready-to-eat (RTE) turkey deli meat and prepackaged spinach—using three popular read-based DNA-to-DNA metagenomic classifiers: Centrifuge, Kraken 2 and KrakenUniq.ResultsIn silico host sequence removal led to substantially fewer false positive (FP) classifications and higher classification precision in RTE turkey deli meat datasets using the FBP-specific reference database. No considerable improvement in classification precision was observed following host filtering for prepackaged spinach datasets and was likely a consequence of a higher microbe-to-host sequence ratio. All datasets classified with Centrifuge using the FBP-specific reference database had the lowest classification precision compared to Kraken 2 or KrakenUniq. When a confidence-scoring threshold was applied, a nearly equivalent precision to the universal reference database was achieved for Kraken 2 and KrakenUniq. Recall was high for both reference databases across all datasets and classifiers. Substantially fewer computational resources were required for metagenomics-based detection ofL. monocytogenesusing the FBP-specific reference database, especially when combined with Kraken 2.ConclusionsA universal (taxon-agnostic) reference database is not essential for accurate and reliable metagenomics-based pathogen detection ofL. monocytogenesin complex food matrices. Equivalent classification performance can be achieved using a taxon-specific reference database when the appropriate quality control measures, classification software, and analysis parameters are applied. This approach is less computationally demanding and more attainable for the broader scientific and food safety communities.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12864-023-09338-w.