dieses mal hier einen super Tipp gefunden https://vimtricks.com/p/vimtrick-remove-lines-matching-pattern/
Using Vim’s powerful “global” command, :g for short. To remove lines matching a pattern, simply use the /d flag to the command. Here are some examples:
:g/pattern/d – Remove lines matching pattern
:g!/pattern/d – Remove lines that do NOT match the pattern