Quick-and-dirty

cat $FILE | sort -u

This works in a pinch, but as a side effect will sort the lines lexicographically. Avoiding a sort is possible but more complex

Remove all but the first occurrence of a line

cat $FILE | cat -n | sort -uk2 | sort -nk1 | cut -f2-

Remove all but the last occurrence of a line

cat $FILE | cat -n | sort -rk2 | sort -uk2 | sort -nk1 | cut -f2-