Remove lines containing a pattern, in place

sed -i '/the_pattern/d' the_file.txt