sed

Delete line containing string

sed -i '/string/d' file.txt