Classical Zn2+-dependent deac(et)ylases play fundamental regulatory roles in life and are well characterized in eukaryotes regarding their structures, substrates and physiological roles. In bacteria, however, classical deacylases are less well understood. We construct a Generalized Profile (GP) and identify thousands of uncharacterized classical deacylases in bacteria, which are grouped into five clusters. Systematic structural and functional characterization of representative enzymes from each cluster reveal high functional diversity, including polyamine deacylases and protein deacylases with various acyl-chain type preferences. These data are supported by multiple crystal structures of enzymes from different clusters. Through this extensive analysis, we define the structural requirements of substrate selectivity, and discovered bacterial de-d-/l-lactylases and long-chain deacylases. Importantly, bacterial deacylases are inhibited by archetypal HDAC inhibitors, as supported by co-crystal structures with the inhibitors SAHA and TSA, and setting the ground for drug repurposing strategies to fight bacterial infections. Thus, we provide a systematic structure-function analysis of classical deacylases in bacteria and reveal the basis of substrate specificity, acyl-chain preference and inhibition.