Removes thioester-linked fatty acyl groups from various substrates including S-palmitoyl-CoA. Has the highest S-thioesterase activity for the acyl groups palmitic and myristic acid followed by other short- and long-chain acyl substrates. However, because of structural constraints, is unable to remove palmitate from peptides or proteins (By similarity). Belongs to the palmitoyl-protein thioesterase family.