Since Joshua's garments were symbolic of his sinfulness, by removing his garments, the angel removed Joshua's iniquity. Causing iniquity to pass from him is an idiom that means that he had removed Joshua's iniquity. Alternate translation: "I have removed your iniquity from you" (See: [[rc://en/ta/man/jit/figs-idiom]])
Here the phrase "official robes" is a metaphor for righteousness. If your language has a word for clothes that people wear only for special occasions, you might want to use it here. (See: [[rc://en/ta/man/jit/figs-metaphor]] and [[rc://en/ta/man/jit/writing-symlanguage]])