How to delete a duplicate in file ?

Hy all,

how to delete a duplicate in a file?

Exemple, in my file1 there is :

user1
user2
user3
user1
user1
user1

I want that my task delete all duplicate for get this file :

user1
user2
user3

Thanks

Regards