Specifically catalyzes the deamidation of the C-terminal glutamine of the prokaryotic ubiquitin-like protein Pup to glutamate, thereby rendering Pup competent for conjugation. Also displays depupylase (DPUP) activity, removing conjugated Pup from target proteins; is thus involved in the recycling of Pup and may function similarly to deubiquitinases (DUBs) in eukaryotes to prevent or promote proteasomal degradation of certain proteins. [prokaryotic ubiquitin-like protein]-C-terminal-L-glutamine + H2O = [prokaryotic ubiquitin-like protein]-C-terminal-L-glutamate + NH4(+) ATP is required for the deamidation and depupylation reactions but is not hydrolyzed during the reactions. Protein degradation; proteasomal Pup-dependent pathway. Belongs to the Pup ligase/Pup deamidase family. Pup deamidase subfamily.