Sometimes we have the requirement for removing the duplicate lines from the text file. For that we can easily use vi to remove the duplicate lines instead of using any other scripts or tools. Here are the options to remove the duplicate lines from the vi file.