Suppose you’re using GNU/Linux or FreeBSD.
Suppose you have a text file.
Suppose you want to delete all the text lines that contains a specif text.
Suppose you don’t know on which line it is, or suppose you have a lot of occurrences of these words.
The solution is simple. Use: SED.
sed -i "/text-i-want-to-remove/d" /path/to/file
Where text-i-want-to-remove is the text contained on the lines you’re going to remove and /path/to/file is the absolute path to the file you want to clean.
text-i-want-to-remove can contains also spaces.
This is the way that’s going to modify the original file.
Suppose you want to keep the original file and you just need a new file with that lines deleted?
sed "/text-i-want-to-remove/d" /path/to/file > new-file
Where new-file is the new text file (in the current directory) without the lines that contained text-i-want-to-remove.