Delete Lines in Nano Editor [Single, Multiple or All]
Delete a single line. To delete a single line, move to the desired line first. Use the arrow keys to move around in Nano. Now press the Ctrl+K and it will delete the line at the current cursor position. It doesn't matter if you are at the beginning of the line or not, it will still be deleted. Press Ctrl+K to cut or delete the current line.