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. 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).