I'm trying to delete any line in a text file with certain text, and here's what I have:

write $+(-dw*,mydeleteword,*) mytextfile.txt

The only problem is, whenever a line is found with that phrase, it deletes the entire file! How can I make it only delete the one line.