A detective who made insulting comments about colleagues and kept a seized knife in his stab vest is to be barred from the profession.