grep remove duplicates

Shell
sort -t: -u -k1,1
Source

Also in Shell: