The problem

When you want to delete a line or several in a file using sed you need to use that syntax:

root@machine:~# sed -i '/mymatch/d' test
… 176 more words