Remove a line with sed Remove a line – in this case 6118 – from a file using sed: sed -i '6118d' myfile.sql