The basic approach to deleting all lines that match a pattern in Vim is very simple:
[sourcecode]
:g/[pattern]/d
[/sourcecode]
If you want to do more, you can switch modes. Here is how you would delete all the lines matching a pattern, along with the line below each match:
[sourcecode]
:g/[pattern]/normal 2dd
[/sourcecode]