I have tried to follow the following:
How to delete selected text in VI editor
but
5dd
gives
E492: Not a
If you want to delete a range AFTER a specific line trigger you can use something like this
:g/^TMPDIR/ :.,+11d
That deletes 11 lines (inclusive) after every encounter of ^TMPDIR.
^TMPDIR