Here's a way to use TextEdit to delete all lines in a text file that contain a specific word. The trick is to use the Special Patterns search function when doing a search and replace.
Note: This is Club MacMost exclusive content. To view this video click the thumbnail below to go to the post as Patreon.com. Once there you will be able to view the video as long as you are logged into your Patreon account and a current supporter of MacMost at the "Club MacMost" or higher level.