Hydrolase that can remove conjugated ubiquitin from proteins and participates in endoplasmic reticulum-associated degradation (ERAD) for misfolded lumenal proteins. May act by triming the ubiquitin chain on the associated substrate to facilitate their threading through the VCP/p97 pore. Ubiquitin moieties on substrates may present a steric impediment to the threading process when the substrate is transferred to the VCP pore and threaded through VCP's axial channel. Mediates deubiquitination of 'Lys-27'-, 'Lys-29'- and 'Lys-33'-linked polyubiquitin chains. Also able to hydrolyze 'Lys-11'-linked ubiquitin chains. Cleaves both polyubiquitin and di-ubiquitin. May play a role in macroautophagy, regulating for instance the clearance of damaged lysosomes. May recruit PLAA, UBXN6 and VCP to damaged lysosome membranes decorated with K48-linked ubiquitin chains and remove these chains allowing autophagosome formation. Thiol-dependent hydrolysis of ester, thioester, amide, peptide and isopeptide bonds formed by the C-terminal Gly of ubiquitin (a 76-residue protein attached to proteins as an intracellular targeting signal). Interacts with VCP; the interaction is direct. Interacts with FAF2/UBXD8. Interacts with DERL1; however interaction is dependent on the UBAX-like region, suggesting that it may be indirect. Interacts with PLAA, UBXN6 and VCP; may form a complex involved in macroautophagy. Recruited to damaged lysosomes decorated with K48-linked ubiquitin chains. The UBAX-like region mediates the interaction with VCP. The C2H2-type zinc finger mediates specificity for 'Lys-27'-, 'Lys-29'- and 'Lys-33'-linked polyubiquitin chains but not for 'Lys-11'-linked ubiquitin chains. Selectivity for 'Lys-11'-linked ubiquitin chains is provided by recognition of the sequence surrounding 'Lys-11' in ubiquitin. The S2 site region provides specificity for longer 'Lys-11'-linked ubiquitin chains.